When working on a few different projects I have begun to notice certain errors appearing which aren’t as easy to debug as others. These are when the URI is encoded and it is causing errors with how the page is being generated. These errors could be either 400, 404, 500, 503 depending on how the server has been set up.
These types of errors can often be flagged up within Google Webmaster Tools as things which need fixing. It can be a little confusing for people without a technical background as the URLs may actually work, if the request URL is decoded opposed to being encoded.
The Uniform Resource Identifier (URI) is the bold section in the following URL – https://www.michaelcropper.co.uk/seo-tools/uri-encoder-decoder-tool-for-seo
The definition of the different acronyms can be a little confusing so hopefully this simple diagram below can help explain. Note it is by no means comprehensive in terms of all of the different bits (the below diagram can be broken down much smaller in terms of definitions) but it should be a good guide.
Encoded / Decoded Example
Decoded URI: http://www.example.com/some-strange-url/with spaces and-special-£-characters?and=parameters&multiple=parameters
Encoded URI: http://www.example.com/some-strange-url%2Fwith%20spaces%20and-special-%C2%A3-characters%3Fand%3Dparameters%26multiple%3Dparameters
Depending on multiple factors including what browser is being used, the configuration of the web server or how the website handles things in the background (which will be different for each different programming language) then the two URLs listed above (which are identical in terms of the information contained) may either work or not work.
If the website is set up to map any URL’s containing “/some-strange-url/with spaces*” to “myscript.php” in the background then if the URL contains “some-strange-url%2Fwith%20spaces” instead, then the result may not get through correctly (again, totally dependent on configurations).
It could also be that the script/program in the background (i.e. myscript.php/asp/aspx/class etc.) is trying to pick up on the parameters within the URL. Those parameters may be identified by pulling back everything after the “?” symbol, so if that symbol is now a “%3F” instead then this may not be matched correctly and the script/program won’t be able to get the data as requested (imagine that had a unique ID in of some sort to get some content and display it to the user).
When checking these issues out, it is a rather laborious task to figure out what each of the special codes mean and manually replace them – especially in long URLs as in the example above. So I have created the tool below to help with quickly debugging these kinds of issues.
URI Decoder Tool for SEO
URI Encoder Tool for SEO
If you have found this tool useful then please share around using the buttons below 🙂