Wouldn’t it be great if you could simply add a new post to your WordPress site, and the following would then take place … all from your post URL:
- Users could quickly understand what your post is about,
- Google would be able to find your pages faster,
- Every piece of content published on your site would have its own unique identifier, making your content easier to manage.
Well, with WordPress permalinks you can!
How To Set Up And Use WordPress Permalinks
Permalinks – What Are They?
A permalink is the permanent URL to an individual post, category, or other taxonomy (a way to organize things together) like archives.
A permalink is the URL that other people use to link to your posts or sections of your site or the links you send in an email pointing to a particular item of content on your site. Some people also call permalinks “pretty” URLs.
Permalinks make the web address pointing to each post on your website permanent, hence a permalink.
Permalinks – Why Do You Need To Use Them?
As you are probably aware, WordPress is one of the best Content Management Systems you can use when it comes to publishing search engines optimized content.
WordPress is not only great for SEO out of the box, but there are SEO plugins you can use that can help to fine tuned its SEO aspect.
If you are looking to optimize the SEO aspect of your website, then you cannot ignore the importance of its URLs. Search engines like Google place considerable weight on the structure of your site’s URLs when indexing its pages.
Permalinks can be used to turn links on your site into “prettier” and more “search engine friendly” URLs. Permalinks can also improve the usability, aesthetics, and forward-compatibility of your links.
Now … let’s see why it’s best to configure your permalinks in WordPress.
Typically, a default WordPress installation uses a URL-naming structure for your posts that isn’t search engine friendly and looks like this …
The link structure shown above is used by WordPress to find information within your database. It doesn’t really mean much to anyone, and it doesn’t help your website with on-site search engine optimization.
As the screenshot image below shows, many WordPress site owners haven’t yet configured their permalinks …
Although these sites are still getting their content indexed on search engines, they are potentially missing out on additional SEO benefits.
To get the best possible SEO benefit from using and improve your site’s traffic results, you should configure your permalinks structure to make it more search engine-friendly by displaying relevant keywords in your URL, instead of meaningless characters.
WordPress allows you to create a custom URL structure for your published and archived posts, so your pages can easily go from something that is non-SEO friendly like this …
To this …
Out of the box, WordPress URLs are not very search engine-friendly. In this tutorial, you will learn how to configure your WP permalinks to automatically get better indexing in search engines like Google.
Setting Up Your WordPress Permalinks
In your WordPress admin click on, Settings > Permalinks …
This brings up the Permalink Settings screen …
As mentioned earlier, by default WordPress web URLs use characters like question marks and numbers to create unique Post Ids and URLs. We want to create a “pretty” permalink instead for our posts. To do this, we need to specify a different Permalink structure than the one set by default.
Common Permalink Settings
In the Common Settings section, select Custom Structure, then add one or more ‘tags’ (see below) to create search engine-friendly URLs …
(Set up your permalink settings to create SEO-friendly URLs)
If you use the custom permalink structure shown in the example above, your URL would look something like this:
Instead of this …
(Using post name permalinks helps readers understand what the page is about)
Creating Pretty URL Tags In Custom Structure
“Pretty” URLs, or SEO-friendly URLs, are created by adding one or more ‘tags’ in the Custom Structure field:
- %year% – The year of the post, displayed as four digits (e.g. ‘2016’)
- %monthnum% – Month of the year (e.g. ‘12’)
- %day% – Day of the month (e.g. ‘07’)
- %hour% – Hour of the day (e.g. ‘06’)
- %minute% – Minute of the hour (e.g. ‘24’)
- %second% – The exact second the post gets published (e.g. ‘04’)
- %post_id% – The unique ID # of the post (e.g. ‘19’)
- %postname% – A correctly formatted version of the post title. For example, if the post title is ”Ten Signs That You’re About To Get Fired From Your Job!”, the postname tag will convert this into “ten-signs-that-youre-about-to-get-fired-from-your-job” (all letters converted to lower case and no punctuation marks) in the URL. Tip: You can always edit this wording in the post slug field on the Add/Edit Post/Page screens.
- %category% – A sanitized version of the category name. Nested sub-categories appear as nested directories in the URI (Uniform Resource Identifier – the string of characters used in the URL). Tip: You can edit this text in the category slug field in the New/Edit Category screens.
- %author% – A sanitized version of the author name.
Note: When using multiple tags, separate each tag using a ‘/’ (forward slash), or hyphen.
For a quick setup, choose the Custom Structure option, and enter the code below into the ‘Custom Structure’ field …
Or, use one of the following structures:
Tip: If you want search engine friendly URLs for your posts, but don’t want to use a custom permalink structure using tags, then choose Common Settings > Post name instead …
Choosing ‘Post name’ is the same as choosing the ‘Custom Structure’ setting and adding the /%postname%/ tag.
Permalinks – Optional Settings
If you need to configure custom permalinks for your category and tag URLs here is where you would do this.
You can change the ‘base’ tag or category URLs using the following syntax:
For example, changing your category base to “recipes” would make your category links display as ‘http://domain.com/recipes/uncategorized/’.
So, if you add the following to your permalinks Optional > Category base settings section …
Your ‘category archives’ page URL will go from this …
To this …
If you leave the optional settings fields blank the defaults will be used.
Remember to save any changes when you are done …
Permalinks – Useful Tips
Sometimes, when you are creating a new post and haven’t given the content a post title yet, the WordPress Autosave feature will save your draft with an assigned numerical permalink (see the example URL in the screenshot below) …
To fix this and give the post its proper permalink, go to ‘Edit Post’ …
Click on the ‘Edit’ button in the post slug section …
Select all content in the post slug field and delete it …
Click ‘OK’ …
The post slug entry will be replaced with the correct permalink based on your post title …
Here is a quick recap of the process …
Remember to update your post to save the changes …
Your permalink should now reflect the new post title …
Note also that when you change the URL of a published post, you should also create a redirect link …
If you change your post title at a later date (e.g. you think of a more compelling post title or use a headline generator tool to help you come up with some killer post titles), remember to fix the permalink to match the new post title and add a redirection to the new post URL …
Make sure that your permalinks match the titles of your posts and pages to help site visitors find what they are looking for and ensure that search engines will better index your content …
Permalinks – Tips
To get the optimal benefit from using Permalinks, you will need to set up your WordPress Categories correctly. If you do not have any categories set up, WordPress will use the default category (uncategorized).
According to WordPress SEO expert Joost de Valk, here are some things to keep in mind if you are wondering whether or not to add categories to your permalink structure:
- If your domain is short and your category slug is short and descriptive (e.g. uses a relevant keyword or keyword phrase), you may want to use the category tag in your permalink.
- If your post slug (the part of your URL that identifies your post) is too long, it can make your post URL harder to copy or share and decrease the SEO benefit.
- Do you plan to post content under only one category or multiple categories? If you are going to post content under multiple categories, then we recommend not using the category tag in your permalink structure.
Ultimately, when it comes to using category vs no category there is no ideal permalink structure to use. Choose the permalink structure you think will suit your site best. SEO experts recommend making your web addresses short enough to be attractive and long enough to be descriptive.
We cover WordPress categories in other tutorials.
Don’t Use Date Permalinks
Another great tip from Joost de Valk is that unless your goal is to run a news blog or there is a special reason why you need to date your site’s content, avoid selecting date-based permalink options when setting up your URLs.
(Avoid using URL structures that time-stamp your posts)
Although setting up permalinks that time-stamp your content may be considered better that using no permalinks at all from an SEO aspect, visitors are less likely to click on a post that is several years old, even if the content is relevant to what they are searching for.
Changing Permalinks In Blog With Published Posts
Normally, your site’s permalinks should be set up when you create a new WordPress site. This should be part of your website planning process.
If your website or blog is already established or your site already has many posts indexed in the search engines and you would like to change the permalink structure, make sure that this is absolutely necessary, as doing so can create issues and errors.
Use 301 Redirects
As you’ve seen in the above screenshots of actual search results, many website owners (or their web developers) seem to be unaware of the SEO-friendly URLs feature of WordPress.
Maybe when you started, your site used the default WordPress permalinks and now you want to optimize your site better for search engines. Perhaps your site was configured to display post dates in your URLs and now all of your posts are showing as being two or three years old and you want to delete the date tags of the permalinks.
The best way to modify your permalinks without negatively impacting your site’s SEO or existing rankings is to add ‘301 redirections’ to reassign links that use the previous permalink structure to destinations that use the new syntax.
A ’301′ code is interpreted by search engines as a link that has permanently been relocated. 301 redirects are the most efficient and search engine friendly way to redirect visitors to new web page destinations and avoid running into ”page not found” errors when clicking on an old link.
To effectively change your permalink syntax and avoid damaging your search rankings, sending visitors to broken links, etc. you should set up a redirection system before changing the permalink structure of your site.
You can add a link redirection system to your do this using a WordPress redirection plugin like Simple 301 Redirects, or Redirection, or use the services of a professional to help you set up and redirect your permalinks correctly to avoid any issues and troubleshoot any errors.
(Set up link redirections using plugins or get professional help)
Congratulations! Now you know how to set up your site’s permalinks to display SEO-friendly URLs for your posts and improve your search results. For additional information on using Permalinks, refer to the official WordPress documentation below:
"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum