How to configure WordPress Permalinks

Last updated on October 18th, 2014 by Robert Abela. Filed under WordPress Security Tutorials & Tips

You have read about SEO (Search Engine Optimization) and how important the naming conventions of your website’s URLs are to improve your search engine ranking.  Although WordPress can be configured to use user / search engine friendly URLs, an out of the box WordPress installation does not use search engine friendly. In this article we explain how to configure WordPress Permalinks so your blog or website uses search engine friendly URLs.

 What are WordPress Permalinks?

If you write an article about your new car, a Ford Focus, an out of the box WordPress installation uses the following URL structure for the blog posts http://www.yourwebsite.com/?p=1.

The above URL does not say much about the content of your page or blog post and it means nothing for a search engine, thus it won’t give it priority. To attract search engine attention, and improve your search engine rankings, you need to have a URL like the following:

http://www.yourwebsite.com/cars/ford-focus

The scope of WordPress Permalinks is to configure WordPress to use search engine friendly URLs, like the one above.

WP White Security marketing tip: If a Google user searches for the term “ford focus” a SEO friendly URL like the above will definitely rank better than the non modified URL. Apart from matching the exact keywords, by using search engine friendly URL you are explaining to the search engine what your blog post or article is about.

Configuring WordPress Permalinks

While logged in to the WordPress dashboard (wp-admin section) using an administrator account, navigate to Settings > Permalinks in the left hand side menu.

WordPress permalinks settings

As seen in the above screenshot, there are a number of permalinks presets you can configure. If none of the default permalinks settings apply to you, tick the Custom Structure and specify your own URL format. In the example above, the URL will be formatted as follow:

http://www.youwebsite.com/category/postname/

Make sure the URL structure always ends with %postname% or %post_id% variables so each blog post or page has a unique URL.

List of Permalinks variables in WordPress

Following is a lift of Permalinks variables that you can use when configuring permalinks to generate a search engine friendly URL.

%post_id%

The unique ID number of a post, for example 365

%postname%

A sanitized version of the post title. For example if the post title is “My new Ford Focus” becomes my-new-ford-focus in the URI. This can be edited while editing a blog post or page as explained below.

%category%

A sanitized version of the category name. For example if the category is “WordPress tutorials”, it will show as wordpress-tutorials in the URI. If a blog post is assigned to multiple categories, the URI of the lowesed number category will be used. The blog post will still be available through all categories URIs.

%author%

A sanitized version of the author name. For example if the author is “John Bonello”, it will show as john-bonello in the URI.

%year%

The year of the post in four digits format, for example 2012

%monthnum%

The month of the year in two digits format, for example 06

%day%

The day of the month in two digit format, for example 19

%hour%

The hour of the day in 24 hours format, for example 22 (10pm)

%minute%

The minute of the hour, for example 41

%second%

The second of the minute, for example 36

Editing a WordPress blog post or page URL

When writing a new blog post or page on WordPress, by default the %postname% is automatically populated with the blog post title as can be seen in the below screenshot. Click the Edit button at the top of the edit page (under post or page title) to specify a different URL for your WordPress blog post or page.

Edit WordPress blog post url

Redirecting pages using older permalinks structure

If you already had some pages published on your WordPress blog or website and you would like to redirect the traffic that hits these pages to their new URL, simply add the below rule for each page in the .htaccess file which can be found in the root of your WordPress installation.

Redirect Permanent /old/url http://www.yourwebsite.com/new/url

WordPress Hosting, Firewall and Backup

This Website is:

Leave a Reply

Your email address will not be published. Required fields are marked *