SEO Friendly URLs in WordPress

By default, the URL structure of WordPress is not SEO friendly and is may not be aesthetically pleasing to you or your website visitors. But Hey, don’t worry, WordPress allows you to change the structure of the URLs through the admin dashboard; it is quick and easy. Let’s see how you can do this.

Why SEO Friendly URLs?

WordPress uses web URLs which have question marks and lots of numbers in them. By having SEO friend URLs, you will have a higher chance of ranking higher in Google and other search engines. This is because you are replacing the question mark and numbers with keywords, which WordPress refers to as tags.

What WordPress URLs look like untouched:

With SEO friendly URLs, your WordPress links will look like this:

You can have a certain tag or a combination of tags. These tags include year, month, day, hour, minute, second, post ID, post name, category and author.

Besides being SEO friendly, changing the URL structure can improve the aesthetics, usability, and forward-compatibility of your links.

WordPress refers to SEO friendly URLs as pretty permalinks.


Your server will have to have one of the following for SEO friendly URLs to work:

  • Apache web server with the mod_rewrite module;
  • Microsoft IIS 7+ web server with the URL Rewrite 1.1+ module and PHP 5 running as FastCGI;
  • Microsoft IIS 6+ using ASAPI_Rewrite;
  • Microsoft IIS 6+ using Ionic ISAPI Rewriting Filter (IIRF); or
  • Lighttpd using a 404 handler or mod_rewrite.

In addition, you will need to: 1) have FollowSymLinks option enabled; 2) FileInfo directives allowed; and 3) an .htaccess file (which you can create or WordPress has the ability to create one).

How-to Create SEO Friendly URLs

Go to the WordPress login page and login. On the left side menu, look for “Settings.” A drop menu menu will appear and then look for and click on “Permalinks.” You’ll be taken to a page entitled “Permalink Settings,” which looks like:

You will change the the post and page URL structure under “Common Settings.” Under “Common Settings” you can pick a pre-made URL structure or use the “Custom Structure.” The “Custom Structure” setting will allow you to make your own URL structure by using one or more tags.

Tags You Can Use

Here are the tags you can use to create your custom URL structure:

%year% – The year of the post, four digits, for example 2004.

%monthnum% – Month of the year, for example 05.

%day% – Day of the month, for example 28.

%hour% – Hour of the day, for example 15.

%minute% – Minute of the hour, for example 43.

%second% – Second of the minute, for example 33.

%postname% – A sanitized version of the title of the post (post slug field on Edit Post/Page panel). So This Is A Great Post! becomes this-is-a-great-post in the URL.

%post_id% – The unique ID # of the post, for example 423.

%category% – A sanitized version of the category name (category slug field on New/Edit Category panel). Nested sub-categories appear as nested directories in the URI.

%author% – A sanitized version of the author name.

Category and Tag Custom Structures

If you like, you may enter custom structures for your category and tag URLs here. All you have to do is add a single word or words separate by dashes to the text boxes. For example, using topics as your category base would make your category URLs look like this:

The .htaccess File

WordPress should be able to create the .htaccess file for you, but if it can’t, create the .htaccess file with the following contents:

# BEGIN WordPress 
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteRule ^login/?$ /wp-login.php [QSA,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> 
# END WordPress

You’re done and good luck!