Website Vidya
WordPressStep-by-Step Guide

Best WordPress Permalink Structure Guide for better SEO

A permalink structure is very important for any website. It affects the ranking of any website in Search Engine Result Pages (SERPs). If the permalink structure of your website is short and simple, the chances of getting ranked in search re...

RR
Website Vidya TeamLead Systems Educator
Published:
4 min read
Best WordPress Permalink Structure Guide for better SEO
AI Executive SummaryCORE CIS AI

4 min read

A permalink structure is very important for any website. It affects the ranking of any website in Search Engine Result Pages (SERPs). If the permalink structure of your website is short and simple, the chances of getting ranked in search re...

Key Highlights
  • Permalink
  • Why should you change your WordPress permalink structure?
  • Changing WordPress Permalink Structure
Grounded in full engineering runbookCORE CIS Ai Engine

A permalink structure is very important for any website. It affects the ranking of any website in Search Engine Result Pages (SERPs).

If the permalink structure of your website is short and simple, the chances of getting ranked in search results high.

On the other hand, if the permalink structure is confusing, not search engine friendly then you might lose your website's ranking in search engines.

This guide covers an in-depth guide for WordPress permalink structure. But before that, let's understand what permalink is all about.

Permalinks are nothing but part of the web address. It comes after the domain name and directs to specific page or post. It is always been a topic of concern that what permalink structure should be preferred.

Quite often, I have found people searching for WordPress permalink structure guide.

This post details the why and how to change permalink structure without losing the traffic that you already have on your website.

The default permalink structure uses the post ID as a unique identifier in the URL:

https:// www.yourdomain.com/?p=123

It's not a good practice to keep website URLs that contain numbers, special characters or any id. I always advise people to get rid of the date in their permalink structure. It makes the website URL a bit shorter and it is always good to have short URLs for Search Engine Optimization (SEO) purpose.

On the other hand, having a date in your permalink structure has proven to diminish the Click-through Rate (CTR). Moreover, people are just not likely to click on a result that's two or more years old.

I have heard many people saying that including just a /%postname%/ can cause a serious performance issue when you have a lot of pages on your blog. Well, it was a real issue a year ago but luckily WordPress has resolved this issue while releasing WordPress 3.3. So you can easily continue to /%postname%/ and stop worrying about the performance issue.

There are many options available under Permalink common setting. You can choose the permalinks structure according to your need. You just need to go to Settings -> Permalinks and select the permalink structure.

E.g., If you have a news website that you can prefer day and name structure.
/%year%/%monthnum%/%day%/%postname%/

In case, you've chosen to use a "Custom Structure" then there are several other useful structures are available to you:

  • %year% = the year of the post (eg. 2016)
  • %monthnum% = month of the year (eg. 08)
  • %day% = day of the month (eg. 30)
  • %hour% = hour of the day (eg. 12)
  • %minute% = minute of the hour (eg. 09)
  • %second% = second of the minute (eg. 36)
  • %postname% = post slug (post title)
  • %post_id% = the ID of the post (try to avoid)
  • %category% = category slug of where the post is stored
  • %author% = author name

You can use any of these tags listed above to customise your permalink. Make sure to end your permalink structure with %postname%. Here are some other good examples of permalink structures:

  • /%category%/%postname% = yoursite.com/category/post-title
  • /%post_id%/%postname% = yoursite.com/123/post-title
  • /%year%/%postname% = yoursite.com/2015/post-title

If you don’t see post name under permalink settings, it means you are still using an older WordPress version. I would suggest you upgrade it to WordPress 3.3 or above.

What happens when you have set this all up but it is not working?

In most cases, you are probably missing the web.config file in the root folder of your website (Windows Hosting) or .htaccess file in the root of your WordPress website (Linux Hosting). Now you need to update either web.config or .htaccess file based on your web hosting type.

1. Web.config configuration (Windows Hosting)

Once you are done with the above steps WordPress will notify you to update the web.config file inside the root directory of your website. Follow these steps:

  1. Go to the root directory of your website
  2. Open web.config in any of the text editor.
  3. Now replace all the code inside web.config with the following code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

2. .htaccess File configuration (Linux Hosting)

Open your FTP client, connect to your website root folder using FTP details and make sure thatĀ .htaccess file is available there and it contains the following code:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Check for more awesome resources on WordPress.

Once you complete all these steps, you will find your new permalink structure working quite well. If you find any difficulty, feel free to contact me and do put your views in the comment section below.

Thanks for reading! :)

Topics:#WordPress
Written by

Website Vidya Team

Technology educator and researcher at Website Vidya.

Discussion

0
Share your thoughts, ask a question, or suggest a tip...
Write →

No comments on this guide yet. Be the first to share your thoughts or ask a question!

Recommended Reading10 Guides

Related Technical Guides

Tested runbooks, server administration walkthroughs, and troubleshooting guides

WordPress•

How to Create a Table of Contents in WordPress

How to create a table of contents in WordPress? Did you ever want to add a table of contents just like Wikipedia has on its website? If yes, I’m going to show you a way that you use to put a similar table of contents box on your blog or web...

RR
Rajesh Rai
Read More
WordPress•

How to Upload SVG to WordPress - 3 Easy Methods

Do you want to embed SVG in the WordPress website? Learn how to upload SVG to WordPress effortlessly with 3 simple methods. Enhance your website with captivating graphics. This how-to guide is for all levels. By default, the WordPress conte...

RR
Rajesh Rai
Read More
WordPress•

How to Hide or Remove the WordPress Admin Toolbar

WordPress displays a toolbar at the top of every page by default. Whether you are viewing your website’s admin dashboard or any page, you will find this WordPress toolbar on every page and it is very annoying for most of the people. Moreove...

RR
Rajesh Rai
Read More