301 Redirects

Why Change a URL?

Often during a website redesign for a client, the page URLs will need updating. There are a few common reasons for this.

Anatomy of a URL

Domain Change

The primary domain name is changing (e.g. going from oldexample.com to newexample.com).

Platform Change

The platform / web language is changing, so the file extensions are either changing or going away (e.g. oldexample.com/about.html to oldexample.com/about).

Site Merge

You’re merging two websites and want to make sure that links to outdated URLs are redirected to the correct pages.

Reorganizing

The site hierarchy is being reorganized and the parent / child relationship is changing (e.g. oldexample.com/news to oldexample.com/resources/news).

SEO

The path (in WordPress this is also known as “slug”) or page name is being optimized for SEO or User Experience (e.g. oldexample.com/about is becoming oldexample.com/about-example-company).

As you can see, there are many good reasons to mess with the URLs of a website, but doing so without doing 301 redirects can have a massive negative impact on your SEO.

If the site you are redesigning has been up for any length of time, it has been indexed by Google and other search engines and has some SEO juice that you don’t want to lose.

When to Use a 301 Redirect?

If you need to change the URL of a page, Google recommends using a server-side 301 redirect. This is the best way to ensure that users and search engines are directed to the correct page, and that you can maintain the search engine juice you had built up.

Note, If the page content is just going away, you don’t need a 301 redirect.

So for example, if a yoga studio stops offering their individual yoga coaching, which lives at example.com/yoga-coach, there is no need to redirect that URL. Just delete the page. In that case, having a 404 error is the appropriate way to handle that old content.

How to Create 301 Redirects

Watch a video icon

Watch a Video (4 min)

The easiest way on WordPress to add a 301 redirect for a changed URL is to use a plugin like Ridirection. Watch this video to learn how.


Wildcard 301 Redirects

If your client is switching domains (e.g. going from oldexample.com to newexample.com), luckily you don’t have to create a 301 redirect for every page and post on the site. Whew! That could take a while for large sites. Wildcard redirects allow you to redirect all of the URLs on your site to another domain with a single redirect rule. SEM Rush says this:

  • Wildcard redirects can also be used when there is a single variable changing — for example, one folder name. The rest of the URL path must be kept consistent to use a wildcard.
  • If you are changing URLs in bulk and there is only a single change being made in the path, wildcards can be an option to redirect all those within a subfolder without the need to implement an individual redirect for each.
  • If there is more than one variable in a path changing, redirects wouldn’t be suitable.
Watch a video icon
Watch a Video (2 min)

Watch this video to learn how to add a Wildcard 301 Redirect via a Bluehost website hosting control panel.


We’ll discuss in another lesson other important things to do when a client switches domains.

Utilize Wildcard 301 redirects to save you a lot of time and mistakes! With any 301 redirects, testing is key! You can also add 301 redirects directly via your server’s .htaccess file. If your redirects are not working properly, poke around the .htaccess file.

  • Make sure the redirect works with and without a trailing slash.
  • Make sure the redirect works with and without the www.
  • Make sure the redirect works without being case sensitive.

If all of those things are in place, you’ve done your job and your client will thank you!

To be honest, this is one of those things a client wouldn’t ever know to ask you for or thank you for. It’s just best practice, so do it right!