Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

What a URL tells the world and how to make effective URLs

What a URL tells the world and how to make effective URLs

URL or Uniform Resource Locator is what it says, it's uniform meaning it remains statically the same and will always locate the same resource no matter if the resource changes. But URLs can do a lot more than just specify a link to somewhere, they can tell you a bit more about a page if they are formed correctly.

Content as a whole can be concisely written and tied to other content through items such as links (URLs) and references. Using content written in a manner that references other content can make it more popular on the web. Using keywords which are used in the content of the document and descriptions that outline the content can also improve it's SEO.

But what about URLs? Rehman & Ahmed (2013) stated that:

SEO factors analyzed by the authors include: page rank on analysis, URL analysis and HTML analysis. Reverse engineering approach is also used by the authors for SEO analysis. They expound five factors of SEO: URL length, keyword that appears in URL domain, keyword density in HI, keyword density in title and URL layers.

What does this mean though? It suggests that we need to look carefully at how to structure a URL to include some of the keywords from the content it is describing. Let's remember here that URLs are meant to be descriptive, and therefore easy to remember, methods of accessing content.

So excluding title keywords and in the meta data, the other place to put these keywords is in the URL. But the first point raised by Rehman & Ahmed is that URL length is important! So that means we cannot just put an arbitrary number of keywords in here - we have to pick and choose what words represent the content best.

A friendly URL is one that this in a short couple of words but also means no redirects and extra load for the server and should therefore be coherent and concise to what the web server expects. A friendly URL should also, where possible, avoid query strings on URLs and encourage the use of rewrites in place of these.

So how does something like a content management system do this? Here I can speak from experience. A content management system or CMS such as Dash will rewrite these URLs by taking the end part of the URL as the name of the post for instance, 'what-a-url-tells-the-world-and-how-to-make-effective-urls' will be the finished 'friendly name' of this post. When Dash sees this it rewrites the URL such that a query string appears to the PHP interpreter instead of this URL. This means that a GET value will contain this friendly name and the PHP interpreter can then work with it. This is a much cleaner method of using URLs than to use query strings.

But how do we make these strings of text effective on the web? From time to time you'll see URLs that throw keywords at you, such as 'url-query-string-effective-use-seo' or something along those lines but these kinds of URLs are bad! Firstly, for the end user they are not easy to remember at all. They also make no sense to the user so when they hover a link in an email and see this, they are not entirely sure what they are going to be reading about. Thirdly, these URLs are considered as garbage URLs to a lot of search engine optimisation tools as search engines themselves are avoiding more and more of these URLs. Think of it like something like clickbait. So these reasons, please avoid doing this.

Effective URLs should however be encoded properly. They will not work if they're not encoded syntactically correct to RFC 3986 which specifies the URL encoding syntax. Some server side languages such as Java and PHP can encode a URL for you, but I like to do things the old fashioned way by simply removing all characters that are invalid to a URL and replacing spaces with a dash (-).

The theory behind an effective URL goes a lot further than this article covers and it's really quite interesting. My concluding thoughts on this are that URLs should be concise and to the point but also should explain the content of the page. Clickbait keywords only URLs should be avoided where possible and URLs that are descriptive should be encouraged.

  • Rehman, K. U., & Ahmed, M. N. (2013). The Foremost Guidelines for Achieving Higher Ranking in Search Results through Search Engine Optimization.
Posted in The Web
Powered by DASH 2.0
Scan and keep for the latest article or review every time!