Mobile app version of vmapp.org
Login or Join
Gonzalez347

: When you use dash as space what do you use for dash? The design decision was to automatically replace spaces with dash (-) when building URLs. This led to URLS such as example.com/user/john-smith.

@Gonzalez347

Posted in: #CleanUrls #Url

The design decision was to automatically replace spaces with dash (-) when building URLs. This led to URLS such as example.com/user/john-smith. This was fine as long as names were "JohnSmith" and "Fred Bloggs".

Then comes "Freddy Double-Barrel" and we have a huge encoding headache. His URL is example.com/user/freddy-double-barrel which looks exactly like his name is "Freddy Double Barrel" (entirely the wrong string for looking this fellow up). So this user's profile is always 404 because there is no easy way to decode back again.

So how do I represent actual dashes when we are using dashes as spaces?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Gonzalez347

3 Comments

Sorted by latest first Latest Oldest Best

 

@Michele947

The URL does not need to contain such level of detail.

It is perfectly fine to have the url you propose: example.com/user/freddy-double-barrel for Freddy Double-Barrel.

From a SEO point of view, the url should cover two aspects:


be appealing to users
describe what the page is about


A url like example.com/user/freddy-double--barrel or example.com/user/freddy-double_barrel does not change anything, they even look a bit unnatural to me.

Most of the slugs generator strip special characters from the title to create a clean and readable url.

Consider the following example, this is the first result in Google for guillain-barre:



The webpage url is: www.mayoclinic.org/diseases-conditions/guillain-barre-syndrome/basics/definition/con-20025832 with guillain-barre-syndrome, but its title is: Guillain-Barre syndrome



As long as your page title, meta description and/or content properly says Freddy Double-Barrel, it is perfectly fine to keep the current slug scheme.

10% popularity Vote Up Vote Down


 

@Dunderdale272

I suggest you use underscore for space replacement and dash for dash so "Freddy Double-Barrel" becomes freddy_double-barrel.

10% popularity Vote Up Vote Down


 

@Hamaas447

example.com/user/freddy-double-barrel can be resolved (maybe) with a directory. For example:

example.com/user/lastname/freddy


OR

You might do the best thing which would be:
client.example.com/lastname/firstname/index.html

IF YOU CAN - Avoid the dashes.



Off topic note: I put your subdomain into https in order to build the trust with your users.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme