Prettifying a URL is an old technique. It is generally called URL Rewriting. Why should you do this? For one, it’s better to look at it. A URL that has “?s=1&sid=4752891&gn=0&.rand=99olqituu202iqzx37a6” after the domain name, can be quite confusing and unpleasant to look at for those who don’t understand it. Secondly, re-written URLs are more SEO-friendly and user-friendly as well. There are many more advantages to URL rewriting, and I won’t cover that here.
Being a WordPress noob, I knew I would be rewriting my URLs to look pretty. Luckily, WordPress has a built-in tool for this so us noobs won’t have to manually edit the .htaccess file by hand. This feature can be found in Dashboard –> Settings –> Permalinks.
Here are a few exmaples of the options already provided by WordPress.
Day and Name –
Month and Name –
The last one is the custom structure, where you have to put in what you want the URL to look like. Clicking on those radio buttons, you will see that the custom structure text field is filled out with something like,
which is the structure for the Day and Name option. Click on other options to see what comes out. These are already clues on how to customize your own URL. I made mine put the post name or page name after the domain. The structure is easy, it’s just like this,
This results in a URL that looks like these,
Be careful with putting a trailing slash on the URL structure. The Day and Name example above has a slash at the end. This could confuse some browsers, such as Internet Explorer, thereby causing the dreaded 404 error.
This error may not be exclusive to WordPress permalink structures alone. It would seem that if you’re not very careful with the rules in your custom .htaccess file and you happen to have a trailing slash in it, chances are you will be getting 404 errors when browsing with IE.