How To Display Username In URL For Drupal Site

| Drupal Development | 21 seen

I know for some experienced Drupal developers such question might sound bizarre, because  - hey..it's a piece of cake..

I have been subscribed to the LinkedIn Drupal group and exactly such question arise here:

hey guys is there any way to display username in URL when user logged in like example www.example.com/username

was asked by one of the group members

I added my solution for this question on that post already and I decided to share it on my blog as well since other Drupal users might ask such question as well.

Solution: How to display username in URL

At first you will need to have pathauto module to be enabled on your Drupal site and all the other required modules - (Path, Token). Once you have installed a pathauto module go to the File Path section (admin/config/search/path/patterns) scroll down until User Paths and in blank field enter: [user:name] 

Drupal User Paths

Drupal User Paths

Dont forget to save your configuration and then bulk update your existing path.

Hope this explains how to add username in Drupal URL.

If you have any Drupal related question, feel free to contact me and I will try to find a solution for your question in a blog post.

 

Latest articles

LEGOLAND Berlin Review: A Fun Family Activity in the German Capital

When planning a family trip to Berlin with children, most travelers immediately think about the Berlin Zoo — and rightly so. But if you are spending a few days in the German capital with younger kids, another solid half-day activity is the LEGOLAND Discovery Centre BerlinWe visited it in April 2026 together with our 7-year-old daughter during our…

Germany |

Ādģēri: The 30K Mistake That Turned Into a Long-Term Experiment

In 2023, we bought Ādģēri in an online auction.Price: just over €30,000.Financing: ~6% interest.Total expected payment over ~5 years: ~€40,000.Status (April 2026): more than half already paid.On paper, it was a bad deal.Realistically, we overpaid by at least 5–6× relative to what the property was objectively worth at the time. No serious buyer…

Ādģēri |