What is a permalink in WordPress?

Permalink is the URL of the page or post on your WordPress site. In WordPress, the permalink is the combination of your domain name and the slug. 

Why the name “Permalink”? The basic idea behind the name permalink is that the URL should be permanent. 

In this blog, I’ve explained all about permalink in WordPress.

Let’s get started!

Click on Settings > Permalinks.
  • Under Common Settings, click on “Custom Structure”. Next, from the Available tags, add “%category%” and “%postname%”. 
Click on "Custom Structure". Then, add "%category%" and "%postname%".
  • Click on “Save Changes”.

If your website has existing content, you should change the permalink of the pages and posts at the earliest to get better SEO results. Here are the steps to do so.

  • Follow the steps mentioned above to change the global permalink settings in your WordPress website.
  • Once done, go to each page and post, and edit the URL Slug. You can find the option to change the “URL Slug” in the right-hand side menu of the WordPress “Page” or “Post” editor. 

How to set up redirects and avoid 404 errors?

If you change the permalink of a page in WordPress, the previous link of that page will stop working. 

Here’s an example of how this issue affects SEO. 

Say that you shared the link of your blog post in your social media post. Now, consider that you changed the permalink of that blog post. 

In this case, the link you shared on social media will stop working. When someone clicks on that link, it will take them to a 404 page.  

When this issue occurs on multiple pages, your SEO will take a hit. Since the page views are decreasing, your revenue through your website will also be affected. 

If you want to avoid these issues, you need to set up a proper 301 redirection

301 redirect indicates to search engines that this page has been moved permanently to a new URL. When you set up a 301 redirect, all the requests to the old URL will be automatically transferred to the new URL. Moreover, the ranking power is also transmitted. 

Thankfully, setting up 301 redirects is pretty easy. 

There are two ways through which you can set up 301 redirections in WordPress. 

  1. Using plugins
  2. Manual method

1. Using plugins

Plugins are the easiest way to set up 301 redirects. The following are some of the best and free plugins to help you with 301 redirections. 

Below, I’ve explained how to set up 301 redirects using the Redirection plugin. 

  • Install and activate the Redirection plugin. 
  • In the left-hand side menu of the WordPress dashboard, hover over “Tools” and click “Redirection”. 
Click on Tools > Redirection.
  • Finish the setup process of the Redirection plugin. 
  • In the “Source URL” box, enter the old URL. In the “Target URL” box, enter the new modified URL.  
  • Click on “Add Redirect”. 

That’s it!

Note: Regardless of the plugin you use, the process of setting up 301 redirects is pretty much the same. 

2. Manual method

If you prefer to set up 301 redirects manually, here’s how to do so. 

Step #1: Log in to the cPanel of your hosting account. 

Step #2: Locate the “.htacess” file from the root directory. Then, right-click on the file and click “Edit” to start editing.

Note: This method is advanced, and any mistake can affect your entire website. Ensure to take a backup of your website before you start editing the .htaccess file. Also, if you’re a beginner, I suggest using a plugin to set up 301 redirects. 

Right-click on the .htaccess file, and click "Edit".

Step #3: Specify the old URL and the new redirect URL by adding a short snippet. Add the snippet code to the end of the .htaccess file. 

Here’s the snippet to 301 redirect a single page to another page.  

Redirect 301 /old-url https://yourdomainname.com/new-url

For instance, say that I want to 301 redirect https://www.rightyguide.com/build-website to https://www.rightyguide.com/build-a-website. In this case, here’s how the snippet looks. 

Redirect 301 /build-website https://www.rightyguide.com/build-a-website

If you want to redirect the entire website, you can use the following snippet.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomainname.com [NC,OR] RewriteCond
%{HTTP_HOST} ^www.olddomainname.com [NC] RewriteRule ^(.*)$
https://newdomainname.com/$1 [L,R=301,NC]

Replace “olddomainname.com” with your current domain name. Replace “newdomainname.com” with the new domain name. 

Step #4: Save the file and check whether the redirects are working correctly. 

Ok, nice!

Once you finish setting up the 301 redirects, I recommend you change the URL of the internal links

Though the internal links will work without an issue because you set up a 301 redirect, updating them with the new URL can ensure that the pages load fast. 

Tip: If you change the permalink settings before publishing any pages or posts, you can be free from all the redirect hassles. 

Conclusion

Permalink is an URL of a page or post, and it’s unique.

As discussed in this blog, the default permalinks of WordPress aren’t SEO-friendly. So, if you want your content to rank high on Google, you should change the permalink and make it short and descriptive.

Fortunately, it’s pretty easy to change the permalink in WordPress. Even if you have several pages and posts on your WordPress website, you can change the permalinks easily.

Be noted that the earlier you change the permalink, the better.

Do you have any doubts about permalinks in WordPress? If so, don’t hesitate to drop your questions in the comment section below.

Picture of Abdul Wadood

Abdul Wadood

Abdul Wadood is the founder of Righty Guide, a digital marketing startup company. He has immense knowledge of digital marketing and is also a good mentor with excellent leadership skills.

Leave a Comment

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

Free Affiliate Marketing E-Book

Sign up for our newsletter and get your free affiliate marketing e-book!