WordPress permalinks refer to the URLs of your website’s content, mainly posts, and pages. It should represent the content of the page so that by looking at it, anyone can guess what it is about. Also, search engines primarily use URLs to identify what your page is about. So, having a proper permalink structure is an absolute necessity in search engine optimization.
When talking about SEO readiness of your site, deciding permalink structure is one of the main tasks you should do at the beginning of your site. There are adverse effects for SEO when changing the site URL structure of an established site. Do not think changing URL structure is not something impossible to be done. But, it is advisable to avoid such situations as much as possible.
In this article, we will cover how you can change WordPress permalinks, what are the default tags available to use, how you can decide on a search engine optimized permalink format, how to change an existing format to a new one and the list goes on. It is a comprehensive article about WordPress permalinks and permalink structure in general. Let us know your questions, comments, suggestions about it in the comments section. Let’s start.
What are Permalinks
A permalink is the name given to the URL that a visitor uses to access a page within a website. This includes physically typing the permalink in to a browser, clicking on it via a search engine or via a link within an external website.
Permalinks first became a recognized term way back in 2000 when a group of webmasters were discussing the creation of permanent URLs within the Blogger platform.
The term permalink is a combination of two words and denotes a permanent link to a resource, in other words one that will not change over time. This is very important in today’s Internet because websites often link to posts and pages on other sites and if those links where not permanent it would result in link rot (Links that no longer resolve to a web page).
Ironically, there aren’t very many links that are not permanent apart from resource links where the URL itself is used to store dynamic information. However, the term permalink has evolved somewhat and is now used to describe a pretty URL where the references to server side resources and page IDs are hidden, being replaced with a friendly URL format that describes the webpage it links to.
Whist permalinks are used on many different content management platforms the term is most often associated with the popular WordPress platform.
Permalinks are Extremely Important for SEO
The history of permalinks is not very exciting but guess what, permalinks are extremely important when it comes to SEO and without putting the right permalinks in place you can be doing major harm to your marketing efforts.
We all know that Google take notice of the keywords that are in a domain name. This includes the part before and after the domain extension. In fact, if you search for a term on Google you will see that term highlighted whenever it appears in part of the page URL. This proves that Google consider it as a ranking factor.
Even though having your exact target keywords in your URL is considered a very marginal factor, it is important to have a descriptive URL. Not only will this help Google to understand what your page is about but it also serves to re-enforce the structure of a website. This structure and placement of webpages within a hierarchy is something that Google relies on heavily when identifying a website’s semantic structure.
To put this into context, if you have a page about Fruit in general and then a page about Apples, a well-structured site would have the Apples page as a child of the fruit page. This helps Google to further understand what that the page about Apples is a page about specifically about a type of fruit.
A good permalink structure would confirm the parent child relationship by producing a URL such as http://website.com/fruit/apples/.
Permalinks Also Help Visitors to Understand Your Content
Having a good permalink structure will also help your readers to understand what your website is about. It is much easier to infer that the example URL above is about Apples than it would be to infer the same thing from an ugly URL such as http://webste.com/?page-ID=1011.
This makes a website with a good permalink structure much easier to navigate. It also allows users to more easily copy and share a URL from your website and it even makes other websites more likely to link to a URL on your site whilst also using a relevant anchor text.
How to Edit the Permalink Structure
WordPress permalink settings can be found in the main settings menu of the WordPress admin area (i.e. /wp-admin/options-permalink.php).
By default, you will see that WordPress uses an “ugly” URL for the permalink structure. It is made up of your website address and then a query string dictating the relevant page ID. This will work fine out of the box but there are a lot of disadvantages to using this type of structure that you will come across further down the line.
What Are the Available Tags to Use in a Custom Structure
WordPress, by default, provide a number of tags which can be used in a custom structure. For example, as you can see in the above image, the %postname% tag is used in the option 5. Likewise, there are few tags available to use in a custom WordPress permalinks structure defined by you. Here is the list,
- %year% – The year of the post, in four digits
- %monthnum% – Month of the year
- %day% – Day of the month
- %hour% – Hour of the day
- %minute% – Minute of the hour
- %second% – Second of the minute
- %category% – The name of the category (if you are using sub-categories, they will appear as nested directories in the URI, for example, if you are posting under ‘apples’ sub-category which comes under the main category of ‘fruits’ then, the URI will begin as “/fruits/apples/”)
- %post_id% – The unique page ID assigned by WordPress
- %postname% – Title of the post (the spaces in between the words of the title will be replaced by the – separator, for example, “this is a sample post title” will be “this-is-a-sample-post-title”)
- %author% – the name of the author
You can use these tags separately or as a combination when creating a custom structure. I will show you few examples below,
- %category%/%year%/%monthnum% – /fruits/2016/12
- %category%/%postname%/%post_id% – /fruits/sample-post-name/329
- %author%/%postname% – /james/sample-post-name
What Is the Best Permalink Structure for SEO?
The best structure depends on what type of site you are building and so it is crucial that you consider permalink structure when you first begin planning your website.
The best and widely-used structures are,
The second option will be useful if you have a large number of categories on your blog or website. It will show the name of that post as well as the category to which it belongs.
Let me give you a sample use case (it’s a very vague example, though). Let’s say you are an expert in various CMS platforms like WordPress, Joomla, Drupal and creating a blog to write on various topics related to them. In this case, it is better to use categories in the permalink structure as it will help visitors to distinguish the CMS you are talking about. On the other hand, if you are writing only on WordPress, then you can stick to /%postname%/ format. What it is important to understand is that there is no right or wrong in selecting either format. You have to decide what will serve your purpose better.
If you need the posts to be in chronological order, then it would be wise to include a reference to the time in all of your content. In this case, you can use something like this:
This format contains a reference to the publishing date and it is useful when creating news publication sites.
If you are building a website that will have static content – for example, pages that are grouped into categories then, again, you may accept /%category%/%postname%/ form. This is good for search engines because it allows you to reinforce what each page is about and how it relates to other pages.
Editing Permalinks at Post Level
Though we define an overall URL structure under permalinks settings, still, it is possible to edit them at post or page level. I will show you how and why you should do it.
Let’s think that we have set the permalinks structure to be /%postname%/ and we are writing a new post, titled as, “how to create an SEO friendly URL structure”. So the default permalink for the post would be “how-to-create-an-seo-friendly-url-structure” based on the rule defined under settings. Isn’t that alright? Why do we need to change it?
There is no harm in letting it be like that. But we can further improve it by removing stop words from and making it short to include only the keyword we focus. Let’s say we target the keyword ‘SEO friendly URL structure’. So, we can modify the post slug as “seo-friendly-url-structure” which is meaningful, short and keyword focused. Likewise, you can do post level minute adjustments whenever necessary.
If you are using Yoast SEO plugin then, it has an option which removes the stop words in the URLs automatically. That is a very handy option.
The Category and Tag Base
In permalinks settings section, there are two optional settings can be found at the very bottom. That enables us to change the category and tag base. You may wonder what those are. The default category and tag page URIs will be like,
Note that, by default, the two types of pages will have the leading word ‘category’ and ‘tag’ respectively in their URIs. The optional settings will permit you to set custom words instead of the default ones. For example, give the category base as ‘topic’ to change the URI to ‘/topic/news/’ and likewise, you can alter the tag base as well.
In case you want to exclude the category base completely, then you can use a plugin like No Category Base (WPML) to get it done and the resulting category URIs will be like ‘/news/’.
An additional read about categories and tags – This article covers about WordPress categories and tags in-detail.
How to Change an Established Permalink Structure?
If you have an established website and you need to change the permalink structure it is a little more complicated. Before you make any changes, you need to ensure that all your existing URLs will be automatically forwarded (Ideally via 301 redirect) to their respective URLs created by the new permalink structure.
Before you begin you should make a decision on the permalink structure that you want to introduce. This might include the date and post name or it might include the post or page name along with parent pages.
When deciding on this new structure it is a good idea to think ahead – how will your website expand in the future and will this new structure accommodate every type of page or post that you plan to create further down the line?
Updating The Permalink Structure
Once you have decided on your structure you are ready to update. This should be done at a time when you receive the lowest number of visitors because there will be a small amount of down time whilst you update the structure.
First of all, take a copy of your current permalink code – this will be useful in the next step. Next, change the permalinks structure to custom on settings >> permalinks and then enter the code for your permalink structure into the custom field.
Fixing Your Broken URLs After Changing the Permalink Structure
Once you have updated your front-end URLs will be broken. In order to fix this, you simply need to install a WordPress plugin called simple 301 redirects. Once the plugin is installed navigate over to settings >> simple 301 redirects.
In the settings area for this plugin all you need to do is add your old permalink structure to the request field and your new permalink structure to the destination field.
After clicking on save the plugin will automatically redirect any requests for the old URLs to the respective new URLs.
Testing Your Permalink Structure
After installing this plugin, you can test that everything is working by searching for your website on Google. The old URLs will still be present for some time but if you click on any of the results you should automatically be redirected to the same page but with your new URL structure.
What to Take Away
After reading this article, hopefully, you have learned the following about WordPress permalinks:
- They help to re-enforce the subject of each page on your website to Google
- They help Google to understand how the pages on your website related to each other
- They help your visitors to understand what your website is about
- They make it easier for your visitors to share your content with others
If you don’t already have a pretty permalink structure that describes what your web pages are about get it changed as soon as possible. You could be missing out on lots of traffic from Google and social media by not doing so.