How To Redirect and Change WordPress URLs To Improve SEO

For most aspects of digital publishing, keeping things simple is a sound philosophy. Easy navigation, uniform layout, and clear-cut content structure are all likely to improve experiences for readers and help with SEO. The same is true for your WordPress URLs: generally, shorter URLs perform better in search engines.

However, many publishers weren’t thinking about how their URLs were structured when they first started their WordPress website, and now they may have hundreds (thousands?) of posts that they want to redirect and change URLs for so that they can improve SEO. What’s more, it’s not always guaranteed the changes will actually improve SEO or traffic that much, if at all.

So is it worth the effort to go through each and every URL to change it from something like, /2019/05/08/post-name/ to just /post-name/, if we don’t know if it is even worth it long-term?

Maybe. Rolling out major changes site-wide without testing is a bad idea in general. We’re all about testing to prove things work. You can do the same with a small number of your URLs easily, then monitor them for 2-3 weeks to see if traffic is better or worse. In many cases, traffic may be 10-15% better. In that case, you’ll know it’s worth making the site-wide change.

Below, I’m going to review how you can redirect and change a few of your URLs to see if SEO and traffic improve. Then, I’ll show you have to make the change site-wide in less than a minute.

Our recent Ezoic Explains video walks you visually through the following steps, but I will break it all down below.

Why are my WordPress URLs long and how can I shorten them?

If you’re a WordPress user, there are many different slugs that it can auto-generate for a new post. If you never selected a specific one, it may have auto-generated all of your posts with additional information, like the date, month, numerical numbers, or just random information.

change wordpress urls and make them shorter for seo

You can control your post URL generation under ‘Settings > “Permalinks”‘. In most cases, it’s best to keep the slug simple and just use ‘post name’.

Where this gets messy is if you’re now a well-established publisher and all of your posts were generated in a way that isn’t serving your site as well.

IMPORTANT – If it is not currently set this way, do not just change this. It will automatically change all of your URLs, but they may not be redirected properly which could massively harm your WordPress site because it will tank your SEO (Google will send all your traffic to 404 pages then stop indexing them until it finds the new ones — even then, it may not fully recover).

Before we get into how we can redirect all the pages and implement this change without any risks, we first need to make sure it will be worth it and that it will positively impact the website.

WordPress has plenty of plugins to help manage and optimize your site, especially with speed, but there is also a plugin to help with changing individual post slugs (URLs). There is a plugin called Custom Permalinks that makes it simple to help control the URL addresses of single posts.

permalinks is a wordpress plugin to control post URLs

Download, install and activate the plugin so that we can start testing our potential change.

To decide which URLs you should test on, go inside Google Search Console or Google Analytics to select about 5-6 landing pages that receive a significant amount of organic search traffic. Using posts that have high organic traffic will yield the quickest and most authentic results, whether they’re good or bad. After 2-3 weeks, we should be able to see traffic increase if this change will be worth it for the whole website.

change permalinks in wordpress seo

How to change single WordPress permalinks to test the impact on SEO

In this example, we’ll be looking at injuryhealthblog.com, one of Tyler’s sites that we experiment on quite a bit. As you can see, the Permalink plugin appears just below the title of the post. Your URL may include dates, numbers, times, or a clunky phrase, but you can actually clear and change the slug right here within the post.

In the spirit of keeping your website simple and intuitive, it’s best to just use your website URL plus a simple slug, such as injuryhealthblog.com/tennis-elbow-recover.

After changing the slug, you need to implement a redirect for the old URL. There are plenty of tools and plugins within CMS systems like WordPress or Joomla, but it’s preferable to run the redirect inside your host because plugins can break or expire. If you do not want to do this at the host-level, you can use the popular WordPress Redirection plugin.

redirect wordpress urls seo

The original slug will go under ‘Source.’ In this case, we’ll pretend it was /2019/05/whatever-it-was-before/. The only thing I want to change about this slug is to take out the date, as I’ve done under ‘Destination.’

IMPORTANT – These redirects should be 301 redirects, and they will be implemented site-wide, allowing me to redirect any referral traffic or links to that page to my new URL. 301s tell referers — like Google — that the content on that URL was permanently moved to the new one. This mitigates most of the major risks with redirecting the URL.

Now, the URL is no longer injuryhealthblog.com/2019/05/whatever-it-was-before/. If someone tries to use that URL, it will redirect to my new one, injuryhealthblog.com/whatever-it-was-before/.

Will changing URLs in WordPress help SEO?

look for trends in the data you collect

I’ll want to monitor the changes roughly week-by-week to observe any trends in performance. Using Google Analytics, I can see if my changes have had a negative or positive effect on my traffic.

Under the ‘Behavior’ tab, navigate to ‘Site Content’ and then ‘Landing Pages.’ I only want to see if my organic search has increased, however, so instead of ‘All Users,’ I’ll want to go in and change it to ‘Organic Search.’ This will show me if search engines are sending these URLs more or less traffic after my change.

monitor SEO and traffic changes from the redirects

Now, I can go to Behavior > Site Content > Landing Pages. I want to navigate to the date preferences and select the date I made the change as the beginning of the time period and then select two weeks out. We will also want to compare the data to two weeks before, so by selecting ‘Custom’ and then check-boxing ‘Compare,’ I can compare the previous two weeks’ data to the two weeks after I made the change.

After I’ve implemented all of these segments, I want to copy and paste the slug of the URL that was changed in the search box on the right. Below, we segmented just to show /mcl-sprain-recovery-time-treatment-protocol/ by copying and pasting the slug into the search bar.

This will show data for any slug that has those elements in it, so that will include the new slug I changed it to and the previous slug, which included the date.

URL slug shorter or longer for seo

From the data we gleaned about this specific URL, I can see that my sessions have improved, though just by 5.45%. This tells me that changing all of my site’s URLs might be beneficial for traffic, but that is why I would want to test four or five posts to see if its a broader trend.

To easily track the changes, I can just make a simple spreadsheet like the one below, where I note each week how many sessions a particular URL had and the percent change. A spreadsheet can help you better understand the impact of changing those URLs, especially if you do a cumulative percent change calculation, as shown below. While this particular post was only a 5.45% increase in sessions, some of these other URLs from injuryhealthblog.com have seen significant session growth in even just a week.

You can easily calculate the percent change by using the formula =(C1-B2)/B2, or whatever your cells are.

track session changes in wordpress URLs

Changing your WordPress URLs site-wide in under a minute

If you’re happy with the progress of your test, you’ll want to remove excess information — like the date or misc. numbers — from all URLs on your site.

Changing wordpress URLs site-wide to post-name

At this point, you can disable the Permalinks plugin because we are going to make the changes to all the pages and posts in the Settings menu like we discussed at the start.

Luckily, we can hack the ‘Custom structure’ setting option to help us design a redirect that will allow us to easily make the change to /post-name/ without having to individually redirect every URL on your WordPress website manually.

HOW TO USE CUSTOM URL STRUCTURE TO WRITE A SINGLE SITE-WIDE REDIRECT: After you’ve selected ‘Custom structure,’ you can use the buttons directly below it to make your previous slug’s formula. In this case, our slug used to include the year, month, and the post name. We want to take this slug setting of /%year%/%monthnum%/%postname%/ and make a rule out of it.

Setting up a site-wide redirect for your WordPress website

Copy the slug and return to your host, plugin, or tool. Name the redirect something you’ll remember. Paste the slug formula from our custom permalink trick into the ‘Source’ section and make the ‘Destination’ just the post name slug, as shown below.

Depending on your previous WordPress settings, you may need to make yours slightly different. If you have trouble with the formula, leave it below in the comments and I’ll write the formula for you.

Setting up a site-wide redirect for your WordPress website

If you have a complicated URL structure, you can look through other redirect rules in the common regex sources. It will give you a huge list of syntax for different rules you can set for your posts.

Use plugins, data, and redirect rules to test and change clunky URLs

There are a handful of small steps that go into testing and changing your posts’ URL slugs, but altogether, the process should be simple once you know what you’re doing. The most important items on the list are to redirect any URL changes and test if those changes would even benefit your site before rolling it out for all of your posts. Here is a quick, short summary of each step:

  1. Simple and concise URLs tend to help with SEO
  2. You can easily change the permalink settings for WordPress under ‘Settings’
  3. Test this first on a handful of high-traffic posts’ 
  4. Make sure to 301 redirect the old permalink to the new one
  5. Monitor the changes using Google Analytics and a spreadsheet
  6. If SEO and traffic improve, make the permalink change sitewide by setting a rule
  7. Make sure and change your permalink settings to only include the post name for all future posts

If you have any questions or comments, leave them below and I’ll try to answer. I can also help with any rules you might need for your redirects.

Share via