Back

How to create and manage URL redirects

The need for redirects may look weird when a website is first created. A new website with only a few pages is simple. Websites, on the other hand, grow with time. As you add more pages and categories, you’ll see that you’re dealing with an increasing number of URLs.

 

A website audit may bring you to pages that aren’t performing well and should be deleted or integrated with others. 

 

So, what do you do with those old URLs?🤔

 

Almost every website owner will need to set up a redirect at some point.

 

Let’s jump right in:

Simply said, redirects are a method of redirecting users (or search engine bots) from one URL forwarding to another when the original no longer exists.

 

When moving content, there are two reasons why you should use redirects:

 

Better user experience for visitors:

 

It guarantees that visitors do not land on a 404 page and instead find something related to their search query strings. This might cause users to bounce or leave the site, which means the chances of turning this user into a customer, client, or even an email subscriber are greatly reduced.

 

We expect to be directed to the relevant website when we click a link, not served an error because it has been relocated or removed.

 

But this happens only when there is no redirect in place.

 

Help search engines understand your site:

 

When a page gives a 404 status code (or similar not found issue, such as 410 – indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. ), search engines will quickly remove it from the index, which means it will no longer have any ranks on the SERPs.

 

Even if the page is just temporarily relocated, you must inform search engine bots.

 

Not to forget that any backlinks pointing to a 404 page will not be considered by the algorithm, resulting in a waste of time.

Remember: Failing to implement redirects can result in both lost search engine rankings and unhappy users.

Types of URL redirects

Visitors cannot tell the difference between redirects, but Google treats them differently in terms of the strength of signals delivered to the target URL.

 

Redirects are categorized as either temporary or permanent.

 

A permanent redirect is seen by Google as a strong signal that the target URL should be displayed in search results.

 

Google, on the other hand, sees a temporary redirect as a weak signal that the redirect target should be the URL shown in search results.

 

There are three main types of redirects to be aware of, however, most website owners would only require the first.

 

  • 301 Redirect (permanent)

 

Here are a few examples of common uses:

 

  • You change the URL of a web page permanently.
  • You make a permanent move to a new domain.
  • You make the transition from HTTP to HTTPS.
  • You wish to resolve difficulties with non-www/www duplicate content.
  • You merge two or more pages or websites permanently.
  • Your website’s URL structure is permanently changed.

 

This sort of redirect happens on both the browser and the server. It’s the most popular and effective redirect. It gets the whole SEO authority of the existing URL. And because search engines understand and index this redirect type, it is the greatest option for SEO.

 

This is the sort of redirect you should use in almost all cases.

  • 302 Redirect (temporary)

 

There are few and far between use cases for 302 redirects, however here are some:

 

  • You wish to redirect users to the proper version of the site (depending on location/language).
  • Wish to A/B split-test a web page’s functionality or design.
  • You want to obtain feedback on a new page without affecting the old one’s rankings.
  • You’re conducting a promotion and want to redirect users to a sales page for a limited time.

 

Other use cases are definitely possible, but they tend to be highly specific and individual. The main rule is to only use 302 redirects if you plan to return to the original website within a short period of time.

 

For example, if you’re rebuilding your website but want to redirect users to a different domain while you work on it.  Or you may A/B test two different versions of a page before committing to a new version.

 

302 redirects are barely used. If you’re thinking about using a 302 redirect, think about if a 301 redirect might be a better option.

 

  • Meta Refresh

 

Have you ever landed at a page and been greeted with the message, “The original URL has moved, you’re now being redirected?” If you are not redirected in 5 seconds, please click here.” Then you’ve gone through a meta refresh.

 

A meta refresh tells a browser to automatically refresh a web page, but it may also be used to redirect URLs. Despite the fact that this is neither common nor recommended.

When should you use redirects?

 

When moving content from one URL to another and, occasionally, when deleting content, you should use redirects.

Here I’m going to mention some reasons why you’d create a website redirect:

 

  • Redirect impacts on SEO

 

Are redirects harmful to SEO?

 

It depends, but most of the time, no. Redirects are not harmful to SEO, but only if they are implemented correctly, as with so many other things.

 

A bad implementation might result in a variety of problems, starting from a loss of PageRank to a loss of traffic. When it comes to SEO rankings, 301 is the way to go because it tells bots that the page has been permanently moved.

  • Redirect a Subdirectory to a Page on Your Site

 

When you create a site, you may have decided to create a page on a subdomain of your site. For example, instead of “www.domain.com/page”, you made it “www.page.domain.com”.

 

And you’ve decided that it’s time to move your page away from the original subdomain structure.

 

In this situation, you’d set up a redirect.

 

  • Redirect Duplicate Content to the Original Page

 

A duplicate type of content is bad for SEO. When you have a large site, it happens to have pages with duplicate content. When you have many versions of the same page, Google has a difficult time deciding which page to rank.

 

By redirecting the duplicate piece of content to the original, you may avoid duplicate content issues. This will reduce visitor confusion while also improving your search engine rankings.

  • Redirect Multiple Domains to a Single Domain

 

In order to protect their online brand, many companies buy several domain names that are connected to their main URL. Instead of buying domains to prevent others from registering them, you may redirect them to your main website.

 

Yes, do not doubt it because it is worth redirecting them to your main site.

 

  • Redirect Your Old Domain to Your New One

 

Take for example in the beginning you bought a domain that was not in your preferences, but over time you managed to find the domain you have always dreamed of. Or another example you have changed your brand name and you definitely have to change the domain as well.

 

Regardless of the reason, in these cases, you need to redirect your old domain to your new domain.

  • Redirect an Old URL to a New URL

 

It is sometimes necessary to change the URLs of existing pages and articles. Perhaps you’re cleaning up your existing URL structure, or perhaps you’ve moved some pages and the previous URL no longer makes sense.

 

In this case, you’ll want to implement a 301 redirect from the old URL to the new one.

How to redirect a URL?

 

Most website owners have a few ways of setting up a redirect. The way that redirects are implemented differs depending on your web server configuration and CMS.  Here are the steps for some typical ways:

 

  • Set up a Redirect in cPanel

 

In your cPanel, you may set up a redirect for your domain. When you log in to your cPanel, go to the Domains section and choose the Redirects option.

 

After that select the type of redirection you want to use for your domain.

 

You can choose between Permanent (301) or Temporary (302).

 

Select the domain name you want to redirect from the drop-down menu. Simply enter the page you want to redirect and the page you want it to go to.

 

Remember: You need to enter the protocol as well, e.g., http://, https://

 

After that, choose whether you want your domain to redirect to www. or not:

 

  • Only redirect with www.: The redirect will only function if visitors include www. as part of their URL.
  • Redirect with or without www.: The redirect will function whether or not www. is included in the URL.
  • Do Not Redirect www.: If visitors use www. as part of the URL, the redirect will fail.
  • Set up a Redirect in WordPress

 

Using a plugin is the simplest way to set up a redirect in WordPress. Redirection is a popular option for this.

 

It’s easy to use this plugin:

 

  • Install the plugin
  • Activate the plugin

 

“ Once it’s set up, you’ll be able to find Redirection listed under Tools. Then click on Redirects in the menu at the top of the screen, and fill in the information for the URL you want to redirect, and the new URL you want it to point to. “  Resource

Set up Redirects in Shopify

 

If you update a URL in your Shopify store, you must ensure that your visitors can still locate what they are looking for without any navigation issues or error warnings.

 

It is simple to set up a URL redirect on Shopify.

 

On the left side of your Shopify page admin select Online Store. Click Navigation and  URL Redirects, after that click, Create URL Redirects. You just simply paste the old original URL and the new URL. And at you just save.

  • Set up Redirect using Apache mod_rewrite

 

For more flexible redirection, you may also use Apache mod rewrite in your .htaccess file.

For example, here’s the code you’d need to redirect from a non-www to a www subdomain.

 

RewriteEngine on

RewriteBase /

rewritecond %{http_host} ^domain.com [nc]

rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

Note: This technique does work for internal links, but try to avoid having internal redirects.

Conclusion:

 

Moving, renaming, and deleting URLs is a common part of our work as SEOs, so are redirects. If you’re new to SEO or need a reminder, redirects inform search engines such as Google that a page has been relocated to a new location.

 

Redirects also help visitors locate the page they’re searching for instead of a “404 not found” page. Setting up a redirect may appear overwhelming at first. However, with several intuitive alternatives, you should be able to complete the work on your own.

 

Redirects, like most things in SEO, may bring a lot of questions.

 

  • Can you have too many 301 redirects? ( Yes! There is such a thing as “too many” 301 redirects when it comes to forwarding a single URL multiple times.)
  • Do redirects hurt the crawl budget? ( On large sites with hundreds of thousands or millions of URLs, redirects might hurt the crawl budget. Because search engines like Google do not have limitless time and resources, you must make the most use of their time.)
  • What are redirect loops? ( When a URL redirects to another URL, that URL then redirects back to the original URL, this is referred to as a redirect loop.  Example: URL1 -> URL2 -> URL3. Because the server tells the browser to keep returning to a redirected URL, the browser becomes trapped in a “loop.”)
  • Can you undo/remove a 301 redirect? ( Yes, it is possible to remove a redirect.)
  • What’s the difference between a 301 and 302 redirect? ( A 301 redirect is a permanent redirect while a 302 is a temporary redirect.)
  • How long should you keep 301 redirects? ( According to Google it’s a good idea to keep your 301 redirects active for at least a year, but because 301s are permanent, you may theoretically maintain them forever. Source)
Author avatar
Jana