5 URL Best Practices
5 rules on how to write your URLs
Here are my 5 rules on how to write URLs. These rules are not convention driven, but business and marketing driven. If you are a developer who never had to consider the business side of any project, or you are wondering what is the best practice for naming a url, follow these rules.
To fully appreciate these rules, you have to understand SEO. Read up on it. It’s an art and science about becoming the top link in the search engines on the Internet.
Every business needs to gain visibility on any search engine for keywords that they are targeting. While there are many factors and work behind getting the business’ website to the top of Google search ranking, some of those factors belongs in the tech realm. And yes URL naming is one of them. Here are 5 of them that contribute.
All urls should be lowercased because urls are case sensitive.
Therefore, from a search engine’s point of view like Google,
/someThing are technically different pages. This implies 2 things:
- Traffic to each of these pages are not accumulated but spread across 3 duplicated pages. As traffic to a page contributes to its ranking on the Google search results for certain keywords, a spread of traffic is handicapping the page in its ranking. This puts the page ranking lower than it can potentially reach.
- These pages, if not handled properly with a 301 redirect, will appear as duplicated contents which again affects ranking.
You might be thinking that as long as there are no spelling error, all is well. That cannot be sure as you are not the only one putting links to your site on the Internet.
For example, your marketing intern engages a blogger to create a blog post with a link to your One Piece site. The intern does his/her job well and emailed the blogger the URL to link to with the most perfect spelling and letter casing one has ever seen. Then the blogger types out the link with all lower casing 🤦♀🤦♂.
Now there are going to be 2 indexed links on Google linking to the same page on your site. And now the traffic to both links are not accumulated. And now, instead of being able to land the top spot for the keywords “One Piece”, the links are at spot 11 and 21 instead.
So you can fire the intern, you can’t fire the blogger, but maybe you should fire yourself :(
2) Use dash instead of underscore
Because Matt Cutts says so. Who is Matt? To put it simply, he was in charge of the quality of Google search results in Google. So if he say use dash-case, use dash-case.
Basically due to historical reasons,
underscored_words are considered a single word while
dash-words are considered 2 separate words,
words. And when people do searches on Google, they will tend to leave out the underscore or dash and replace with a space. This makes
dash-words the more favourable alternative as both words are now under the radar of the keywords that are being searched.
PS. but then again the legend says it does not matter.
3) Contain what people will search for
Url of an article page should be
This should be straightforward to understand. It’s because people will search
url best practices instead of
936329ba36a7. And if your url has these words, the page will have a better ranking because the url of the page is obviously relevant to the keywords. On the other hand, having a url with a gibberish id will not contribute anything to the ranking of the page.
4) Change url whenever there is a change
There are times when we need to change the url for various purpose.
As an example, when I realise there more best practices to be added to this article, the url will need to change to 5 from 3.
Changing a number is trivial because nobody really searches with a number in this context. They will probably stop at
url best practices.
For example, if your url is
and your marketing director mentions that there is an increase awareness on animal health. In order to ride the wave, he/she suggests to change the url to
So structuring your url so that it can change whenever required is crucial.
5) 301 redirect whenever there is a change
Should there be a change in your url, make sure the old url does a 301 redirect to the new url. This is because
- the old url may still be used, for example, by random people in their own blogs. If there is no redirect, their readers will be led at a dead page. That is bad news as precious traffic to your site is lost.
- from Google’s point of view, the old and new urls represent different pages. The new url is considered a new page in their history of search result. So it does not have the ranking power of the old url. As for the old url, it is considered a dead page and Google will de-index it from it search results until it comes back alive.
With 301 redirect, the ranking power of the old url will be transferred to the new url and all will be well. An alternative is using canonical links. Compare them here.
These are some tips on writing your urls. They are driven by business decisions and it is better have this in mind and instil it inside us at the start of the project rather than changing in middle of it.
Having said all these, SEO is a complicated thing to master and it is ever changing as Google seeks to improve search results quality. You can probably expect your page ranking to jump from 300 to 200 by working on your url names, but don’t expect it to go from 100 to 1. It is as difficult as becoming the Pirate King in One Piece; the manga would have been long over if it was this easy 😂
Many other factors contribute to SEO. This is just a very very small part of it.
Here is a question for you. What should your url be for a search page on your website? Let’s say users search for a place to do spa, and there are filters on location, prices, type of spa, etc. What should the url be like on the search page?
Yes. Think about having the keywords in the url.
A very good example is Treatwell, originally Wahanda. They are a spa/salon booking site, and their search url contains all the keywords to cater to each filter parameter. An example for a search for body spa service in Birmingham, UK looks like this:
This url is very optimised for the keywords that a user will search for. Which will help boost search ranking for the page.
If you search for
body spa in birmingham on Google, Treatwell’s search page will not appear. This is because Treatwell did not rank this particular page. Do a search on
site:https://www.treatwell.co.uk/places/treatment-group-body/offer-type-spa-break/in-birmingham-uk/ and there will be 0 results. (5th Nov 2017)
Try searching for
top body spa in birmingham. The search result with the url
https://www.treatwell.co.uk/places/at-day-spa/in-birmingham-uk/ appeared on the first page for me. If you check it out, it will bring you to their search directory. There you have it. Your search directory is on 1st page of Google. Isn’t that awesome?