Building a 301 Redirect Map

Discover the art of crafting a 301 redirect map to safeguard your SEO during website transitions. A step-by-step guide awaits you!
February 22, 2024

It’s not uncommon for brands to move away from a legacy content management system (CMS) to a new platform. Brands typically undergo these website migrations as a means to update site technology, site redesign, improve user experience, and support search engine optimization.

During these website migrations, a great deal of thought should go into redirect mapping. Redirect mapping is the process of taking legacy URLs and web pages from the antiquated CMS and pointing them to their new URL location on the upcoming platform.

There are several considerations to be had when building an optimized 301 redirect map. I’d like to walk you through those considerations, best practices, and pitfalls when building out a redirect map for your site migration.

Who Should Use This Guide?

This guide is meant for wide-scale redirect efforts; those typically found within website migrations. However the learnings from this guide can be extrapolated for any heavy redirect effort.

This guide can help,

What is a Redirect?

A redirect tells search engines that a previous location has moved.

You can denote the supplemental information with the type of redirect that is used. Below are a few of the most common

  • 301 Moved Permanently: tells search engines that a page has moved / redirected permanently 
  • 302 Found: a temporary redirect that redirects users and search engines to a different page for a limited amount of time.
  • 307 Moved Temporarily: also tells search engines that a page has temporarily moved but guarantees that the request method will not be changed.

During a migration project, the ideal redirect to put in place across a redirect map is the 301 Permanent redirect.

What is Redirect Mapping?

Redirect mapping is the process of identifying legacy URLs and their new locations or redirect targets. 

The direct output of this exercise is a redirect map, or a map of all redirects that will be built from a legacy location to a new location.

For example, we have the below map of URLs we would need to create as we migrate a website.

FromTo
https://www.old-site.com/https://www.new-site.com/
https://www.old-site.com/watches/cat_17https://www.new-site.com/c/watches/
https://www.old-site.com/watches/mens-watches/cat_89https://www.new-site.com/c/watches/mens-watches/
https://www.old-site.com/watches/womens-watches/cat_89https://www.new-site.com/c/watches/womens-watches/
https://www.old-site.com/brown-leather-watch/prod_123https://www.new-site.com/p/brown-leather-watch/123.html
https://www.old-site.com/red-strap-watch/prod_456https://www.new-site.com/p/red-strap-watch/456.html

Why Redirect Mapping Matters

As a page is created and found by search engines, it begins to accrue search engine authority. Search engine authority is the value or equity search engines assign a page based on a slew of factors – domain age, backlinks, relevancy, etc. Search equity impacts how a site / webpage ranks within search results.

Redirect mapping during a site migration is a measure to retain search engine authority across all legacy pages onto a new site with the use of 301 Permanent Redirects. Doing so mitigates any loss of ranking brought upon by a site migration and ensures minimal fluctuations post-launch.

A 301 redirect tells search engines that a previous location has permanently moved and that all search equity from a previous location should transfer to a new location.

Without a robust 301 redirect map, the risk to SEO performance will be greater. For example, below is an auto parts website that hadn’t enabled a sound redirect strategy and experienced a decrease in organic search performance. 

How Long Does Redirect Mapping take?

The level of effort needed to build a redirect map will depend on a site by site basis.

All redirect mapping builds require a unique redirect strategy; there is no one size fits all approach. One site might be small and simplistic, very straightforward; another site might consist of thousands of URLs and house dynamic URL logic.

There are processes that can be taken to ensure redirect maps are accurate and efficient. Let’s walk through what you’d need to do to start creating an accurate and efficient redirect map.

How to Build a Redirect Map

Although the output may be as straightforward as a 2 column Excel spreadsheet, the input may be much more strenuous.

Below, I outline approaches for gathering and the necessary URL data that will be fed into a redirect map as well as understanding how redirect targets should be identified.



Obtain Legacy URLs

Because the goal of redirect mapping is to take the search engine equity accrued on legacy URLs and direct that authority to the new CMS.

You’ll need to identify the wide breadth of URLs that were generated by your legacy CMS.

There are several ways to do so, and there is no right way as identifying URLs might be CMS dependent but the goal is to begin taking an inventory of all pages that perform well within organic search and may be detrimental to site performance.

Taking a Page Inventory

Let’s walk through identifying legacy URLs.

Crawl Your Site

If you haven’t already done so, I highly recommend downloading Screaming Frog – it is a web crawler and one of my favorite website migration tools. This is significant because you’ll want to crawl and scour your entire legacy site and all its URLs for redirect mapping purposes.

What’s more, you’ll want to emulate, or mimic, Googlebot using Screaming Frog. Crawling your entire site as Googlebot will give you a snapshot of all the URLs on your site you will need to account for in your redirect map.

Below is a sample crawl I started for my website.

Sitemap URLs

At times a legacy content management system is so convoluted and complex that retrieving URLs from a site crawl is not possible. However, most CMSs allow webmasters to generate an XML sitemap file. 

An XML sitemap file is a file that should contain all the URLs from a website. These are then fed to Google via Google Search Console.

The sitemap files generated by a CMS can be used to gather URLs needed for a redirect map. This route can supplement or replace URLs identified in a site crawl.

Google Search Console

To ensure you’re capturing all performing URLs, I like to lean on Google Search Console, or Bing Webmaster Tools, to retrieve all URLs found within the SERPs over the last year. You can sort through both clicks and impressions to get a sense of which URLs are top performers. From here, you can download the page level data and add to your list of legacy URLs.

Google Analytics

Similar to Google Search Console, you can lean on performing URLs as reported by Google Analytics. The added benefit to Google Analytics is you can view performing URLS outside of the organic channel into other channels as well. What’s more, you can add in revenue as a means to assess SEO priority.

3rd Party Ranking Tools

In the SEO industry, there is no shortage of ranking tools – Moz, Ahrefs, SEMrush, etc. Whatever tool you’re using, make sure you pull performance metrics, including performing URLs and loop that back into your redirect map.

Parameter-based URLs

It’s important to acknowledge that the organic channel isn’t the only channel in a brand’s digital marketing arsenal. You have Social, Email, PPC, and Affiliate. You’ll want to lean on the other channels to gather performing URLs to add into a redirect map.



These channels may link to the same content as organic but append a parameter to denote session ID, or some unique factor.

For an efficient redirect map, drop the parameter for the redirect map and work with a single URL. That is to say if the URL below was found in your PPC program,

https://www.example.com/product.html?utm=123

It would essentially be the same as the below URL,

https://www.example.com/product.html

Except the former houses a parameter to denote additional information about a user visiting the parameter URL.

You’ll want to work with the non-parameter based URL, if possible, and ensure your new CMS can manage parameter-based URLs – more on that later.

Managing Old / Legacy URLs

You now have a slew of legacy source URLs that you’d want to redirect. Depending on the size of your size, it can be small or relatively large. There are processes you can perform to better manage your list of URLs. Let’s walk through.

Import into Excel

I’m a huge fan of Excel for redirect mapping.

You can import all the top performing legacy URLs you’ve found via the data aggregators into an Excel spreadsheet. From there you’ll be able to sort and filter based on any criteria you’d like.

Keep in mind that you’ll be working with URLs that house different metrics; you won’t need to pull in those metrics. The end product of all the data gathering is a list of URLs you want to use as your source URLs.

From here you can start assembling a 2 column redirect map – 1 column for source URLs and 1 column for your target URLs.

De-duplicating URLs

An area I see brands struggle with is managing duplicate URL data across data aggregators. There is a strong likelihood that the above data aggregators will report on the same URLs. You don’t want to be caught in a place where you pick 2 identical source URLs with 2 different target URLs in a redirect map.

What you’ll want to do is de-duplicate all the source URLs you’re working with. This can be done with an Excel spreadsheet.

Excel offers an option to remove duplicate values in a column which we can use to de-duplicate the URLs we’ve identified above. Below is a brief example of how it would look like using a set of example duplicate URLs.

(P.S. ignore the black box generated when clicked on column A; my software created that shape but you’ll just need to select an entire column)

Categorize Legacy URLs

After the exercise you’ve performed above, you should have a list of source URLs you’ve de-duplicated, and now you’re dealing with unique URLs that you will eventually redirect; so the risk of using duplicate source URLs is minimized.

The next step I recommend is categorizing source URLs.

If your site houses 1000s of URLs that need to be redirected, it’s going to be easy to get overwhelmed. Categorizing source URLs will make redirect mapping more manageable by focusing on page types rather than tackling all URLs in one foul swoop.

E-commerce sites, for example, typically have category, subcategory, product, and content pages. I’ve typically handled category and subcategory redirects separate from product redirects – as such, I have a “Category” (for all categories and subcategories) and a “Product” (for all products) categorizations. Separating the two allows me to better tailor a redirect strategy for both categorizations.

Additionally, categorizing source URLs allows me to finalize a redirect map in segments. That is, I can be done with category redirects but still be working through products. Lastly, categorizing URLs also makes the QA process easier as you’ll be able to test redirects in batches rather than as a whole.

Find Redirect Targets

At this point, you should have a categorized list of source URLs. The next step will be finding target locations for legacy source URLs on your new CMS.

Easier said than done.

However, there are items you should think through to help identify target URLs. Let’s start.

Understand CMS Redirect Solutions

Native redirect solutions may vary depending on the CMS you’re working on. Some content management systems are able to create redirects using native technology. Others may require supplemental configuration to be able to efficiently execute redirects.

Some redirect solutions may be intuitive; others less so.

It’s going to be important to understand and ask what your new CMS redirect solutions are. Below are questions you should ask yourself and your migration team when building a redirect map.

What native redirect solutions does the CMS have?

As mentioned above, redirect solutions may differ between CMS’s and it’s going to be important to understand the features and limitations of redirect capabilities on your new CMS.

Below are some example use cases around select CMS redirect capabilities.

  • WordPress doesn’t offer an intuitive redirect portal and webmasters may have to lean on the .htaccess file. However, there are several plugins that allow you to redirect efficiently through either single uploads or in bulk. These plugins are pieces of software that are uploaded to your WordPress site and can help manage redirects.
  • Salesforce Commerce Cloud offers various redirect solutions and can natively manage thousands of redirects at a time. However, there is a learning curve depending on how you’d like to execute redirects. Read my Salesforce Commerce Cloud SEO guide to learn how to build redirects (sections 5 – 7, are all about redirection capabilities).
  • Magento 2 can manage redirects through URL rewrites however depending on how your M2 site is built, redirect mapping through URL rewrites may be more tedious. However, similar to WordPress, M2 can lean on extensions that help with redirecting and SEO as a whole. MageWorx does a great job of implementing SEO and redirects.
  • Shopify has really boosted up their SEO capabilities over the last several years, including their redirect functionality. They’ve integrated native redirect functionality to help streamline redirect building.

The above are select CMS’s; there are going to be other platforms where building redirects may not even be feasible through a CMS portal. This is why it’s important to understand how redirects will work on your new CMS.

If your new CMS doesn’t house redirect capabilities, you’ll have to work with technology partners to gather a list of redirects and upload directly into a server or other technology. It’s not uncommon for this to occur to some larger brands where tech groups manage this aspect of a migration. Your goal will be to work with whichever group manages redirect uploads and QA alongside the upload.

Do the redirect capabilities only require URLs? Or another page identifier?

It’s going to be important to understand what values are going to be needed for redirects when uploading to a CMS – that is, if you’re building out the targets for a map, can you just provide a URL as a target, or a URL path? Or would you need to provide a page ID?

Most, if not all, CMS’s assign an ID to any page asset that is created. That is, a category page has an ID, a product page has an ID, a content page has an ID, etc.

When building out the targets for a redirect map, you’ll want to understand if you need to lean on page IDs rather than URLs for redirects.

If you find you’ll need to lean on URLs, you and your team need to finalize a URL structure. I’ve seen brands wait to the last minute to finalize their URLs and it becomes a blocker for redirect mapping. As such, it’ll be crucial to understand what values will be needed when defining the redirect targets. 

Redirect Best Practices

Relevant Target URLs

When crawling a 301 permanent redirect, search engines will look at the nature of content for the source URL and the target URL. It does so to ensure that there is a continued level of relevancy going into the new site.

Let’s say on your legacy site, you have a content page that ranks well for “how to walk a dog” related keywords. Going into a new CMS, you decide to redirect the “how to walk a dog” page to a target URL / page that answers “why is the sky blue”. Google has no reason to rank the new page for “how to walk a dog” keywords as the “why is the sky blue” page is irrelevant.

When building redirects, you’ll want to make sure your targets remain as relevant as they can to the source URLs.

Status Codes

We talked about status codes briefly at the start of the post but it’s crucial we talk further about their significance in redirect mapping.

Status codes define the state of a webpage when a URL is pinged by a search engine and user. It tells search engines whether a page is found, moved, not accessible, or other. Below are some common status codes you might encounter on a regular basis.

  • 200 OK: tells search engines that a page is completely accessible and live
  • 301 Moved Permanently: tells search engines that a page has moved / redirected permanently
  • 302 Moved Temporarily: tells search engines that a page has moved / redirected temporarily 
  • 404 Not Found: tells search engines that the requested URL is not found and there is an error
  • 410 Gone: tells search engines that the requested page was but is no longer live; it is gone
  • 500 Server Error: tells search engines there has been an error at the server level

When building a redirect map, redirects with 301 Moved Permanently states if pages have moved permanently to a new location. This will tell search engines that the legacy page is no longer around and that all search engine authority be moved to it’s new location.

It’s not uncommon for brands to use 302 Moved Temporarily redirects in their redirect maps. 302 status codes tell search engines that a location has temporarily moved and all search engine authority should not be transferred just yet.

Google confirmed that 302 Temporary redirects pass on link juice and, according to Google’s John Mueller, the difference between 301s and 302s is subtle but it still might take Google longer to understand whether 302 was misused. This lapse in time still has potential to affect your site’s organic performance – sessions, revenue, etc. That said, it is still best practice to use 301 Permanent redirects if pages have permanently moved.

Redirect Pattern Matching

It’s important to consider the redirecting mapping file size when building a map. Depending on your redirect solutions and the amount of redirects that need to be built, your mapping file size may increase to a point where it puts a strain on your site’s performance.

Let’s say, you have 40,000 redirects but are looking for a redirect rule for a single URL. Your CMS / redirect solution might have to comb through tens of thousands of lines of redirects to identify the correct logic and redirect appropriately for a single line.

A very common and nifty solution around an exhaustive file size is pattern matching. That is, identifying patterns from a source URL and building redirects based on that pattern.

This capability will vary depending on your redirect solution as well as the URLs you’re trying to redirect.

In another post, I call out the use of SFCC SEO Wildcards – they serve as Commerce Clouds pattern matching capability. Looping the example called out in that post, let’s say you are redirecting multiple products whose legacy URLs are using product IDs that are not changing in SFCC from a legacy platform. The product IDs are housed in the last subfolder and are as follows,

  • https://www.example.com/p/white-leather-heels/123ABC/
  • https://www.example.com/p/beach-sandals/456LMNO/
  • https://www.example.com/p/black-leather-loafers/789XYZ/

With Commerce Cloud, you can single out the product ID as criteria to be used in the redirect mapping logic. In the example above, the rule that would pattern match and redirect URLs that qualify, would be

/p/*/*/ i p,,,Product-Show,,pid,{1)

Although the above is unique to Salesforce Commerce Cloud, the principles of pattern matching remain the same across various redirect solutions – find commonalities in legacy URLs that can help guide the redirect mapping logic into the new site.

Mass Redirects / Catch-alls

I’ve worked with brands who redirected all legacy URLs to a single location on their new CMS such as the homepage. 

Thereafter, they experienced substantial declines site wide.

Ensuring that a target URL remains relevant to a legacy URL impacts how search engines will continue to rank your webpages. 

Not only will you be losing out on search engine equity, you may be doing users a disservice who have either linked to or bookmarked your web pages. Once clicked, and taken to an irrelevant location, there may be confusion on their intended target and you’d be creating a negative experience.

There’s less reason for Google to rank your site as it’s become less relevant and doesn’t contribute to a positive user experience.

Uploading Redirects – Who will manage?

This is closely tied to the redirect solutions called out above.

Several, but not all, content management systems will allow for bulk import through a CSV or Excel file – which is why I suggest leaning heavily on an Excel spreadsheet.

Depending on the CMS, the template needed to upload a redirect map will vary. Some files will require a 2 column approach (Source URLs + Target URLs), others may require supplemental information.

I’ve worked with 3rd party tech partners that require a .txt file that resembles a .htaccess file. This file may seem more complicated than other approaches but I suggest working with your tech partners or filing a support ticket to identify a format that works best for redirect uploads.

Testing Redirects

At this point, you’ve uploaded your redirects with whichever solutions exist for your new CMS. You’ll want to ensure the redirects are working as intended. To do so, you can engage in a series of QA measures.

Screaming Frog

I lean on Screaming Frog exclusively when QA’ing redirects. The tool can act as a crawler but you can also submit a list of URLs that you’d like to QA against.

Because you have a list of legacy URLs that you’ve obtained earlier in the redirect mapping process, you’ll be able to take that list and crawl it in your new CMS.

Your new site might live behind a login, in a development or staging environment. You’ll need to update the URLs you’re QA’ing so they align with your testing environment. That is, if your live site lives on

https://www.example.com

And your staging / test site lives on

https://stg.example.com

You’ll want to ensure the legacy URLs you’re testing reflect the staging site.

301 Redirects

As mentioned earlier, there’s a strong likelihood that you’ll be using 301 Permanent redirects.

That being the case, when you crawl the redirects you’re QA’ing, you’ll want to pay attention to the status codes Screaming Frog is reporting.

I’ve encountered cases where all URLs should be 301 redirects but the crawler identified URLs that led to a 404 status, 500 status, or other.

If you encounter any non-301 status codes, you should deep dive and attempt to understand why these status codes are occurring. Does the target page not exist? Was there an issue with the server that hosted the staging site? Was there overlapping redirect logic?

Redirect Loops

During your redirect mapping build, you may encounter a redirect loop. A redirect loop occurs when a URL redirects to a target that redirects again to another location.

Search engine authority is passed on to the target during a redirect but the equity is chipped away during a redirect hop. That is, not all of the search equity is retained during a redirect. By adding an additional redirect we continue to dilute the authority of the original source URL.

To ensure that your redirect map is devoid of redirect loops, be sure to crawl the target URLs. This ensures that you’ve narrowed down a list of targeted 200 OK status URLs and it weeds out errors or redirects.

Don’t Forget Parameters

As called out earlier, it’s crucial to account for parameter-based redirects. That is, if your legacy URLs append parameters from different channels, i.e. paid search, social, email, etc. the parameters should carry over into the targeted URLs. 

Parameter-based redirects should not be neglected during the QA process.

You can test parameters by either taking a series of real parameter URLs or appending a sample parameter. I typically append a generic parameter such as the below across all Source URLs and crawl using Screaming Frog.

https://www.example.com/product.html?utm=123

Brands have at times forgot to account for tracking parameters within their redirects and it can appear as though other channels experience a decline in performance. To account for proper attribution, you’ll want to ensure parameters are appended within redirects.

Non-indexable Redirect Targets

As you build your targets, you want to ensure you cross-reference against your robots.txt as well as ensure that the targets are canonical variants.

Pointing a redirect to a location that is blocked by robots.txt tells search engines they can go no further and the search engine equity is not properly transferred.

Pointing a redirect to a non-canonical page also affects how search engines transfer authority. Although, the canonical tells search engines that authority should point to a single location, pointing a redirect to a duplicate or non-canonical may not be efficient and result in errors in Google Search Console.

Summary

With all its nuances and processes, redirect mapping can be an exhaustive effort but given its impact on search engine visibility, it is a necessity during a site migration.

Based on experience, it may require long hours and tough conversations but accounting for a redirect map saves you from a larger headache post-launch.

For more information or if you need help with redirect mapping, please feel free to contact me.

Happy redirect mapping!

Subscribe To #PragmaticSEO

Practical SEO advice. Personal SEO advice.

[Active] Blog Post - Side Bar Newsletter Signup

Reach out

[Active] Blog Post - Side Bar Contact Form