Redirect Website and Webpage: 4 Methods with Examples
By: Dileep Thekkethil | Updated On: January 23, 2024
Table of Contents
Based on the redirect codes used by the website owner, the users and search engine bots get translocated to destinations that may not be the same as they saw before. However, this change can be permanent, temporary or forced by actions users take.
The intention of redirects is to ensure the users and search engine crawlers are pointed to the right pages within a website so that they don’t land on a 404 page or other error pages that hinder the smooth journey.
Let’s delve deeper into the world of redirects, understand their types, and discover their relevance in real-world contexts.
Want to see your website at the top? Don’t let your competitors outshine you. Take the first step towards dominating search rankings and watch your business grow. Get in touch with us now and let’s make your website a star!
Redirects Explained
Imagine you have recently bought a new house in the US. You need to redirect your mail and for that you need to set up mail forwarding through the US Postal Service, right?
Similarly, when you decide to change the URL of a page or remove the page altogether, you don’t want any unsuspecting user to be invited with an error message stating the page doesn’t exist, would you?
So, when a proper redirect is added to the pages that you have made changes to the URLs, it can send the users and the search engine robots to a different URL than the one they initially requested.
Now let’s look at the different types of redirect rules
4 Different Methods of Redirects and Their Uses
Different redirect directives serve different purposes. Here are the most common types, each with its unique role in website navigation and SEO.
301 Redirect: “Moved Permanently”
Just like how you move to a new address permanently, a 301 redirect is used when you decide to move a web page or an entire website from its current URL to a new one.
When 301 is added in the .htaccess, theme PHP or via a plugin, it gives the directive to the search engines to refresh existing index records and transfer all link juice that the old URL had to the new page. This way you can retain the SEO value the old page had.
Here’s how you can create a 301 redirect from one page to another:
apache
Copy code
Redirect 301 /oldpage.html http://www.yourwebsite.com/newpage.html
In this line of code, /oldpage.html is the path to the page on your site you want to redirect from, and http://www.yourwebsite.com/newpage.html is the full URL of the page you want to redirect to.
Here’s how you can redirect entire website to a new domain:
apache
Copy code
Redirect 301 / http://www.newwebsite.com/
Remember, before editing your .htaccess file, or the theme PHP file, it’s always a good idea to create a backup as small errors can make your website inaccessible.
If you’re not a technical SEO expert using WordPress, there are handy free plugins available that can help you get the 301 redirect job without you having to write a single piece of code.
Here is an example of how to activate 301 redirects by using the Redirection plugin.
- Setting up the Redirect: Once the plugin is activated, navigate to “Tools” > “Redirection.”
- Create New Redirect: Click on the “Add New” button. Here, you will see two main input fields: “Source URL” and “Target URL.”
- Source URL: This is the old URL that you want to redirect from. You only need to insert the path that comes after the domain name. For example, if the URL is “www.example.com/old-page“, you only need to insert “/old-page”.
- Target URL: This is the new URL that you want to redirect to. Here, you need to insert the full URL. For example, “http://www.example.com/new-page“.
- Choose Redirect Type: Make sure that the “Group” is set to “Redirections”, and “HTTP code” is set to “301 – Moved Permanently”.
- Add Redirect: Click on the “Add Redirect” button.
302 Redirect: “Found” or “Moved Temporarily”
302 is a temporary redirect solution to a URL change that arises when you end up in one of these instances.
- If you’re performing maintenance on a webpage
- You’re testing a new page and want to temporarily redirect traffic from the old page to the new one.
- When you’re running an e-commerce store and a product is temporarily out of stock, you may want to redirect the users to a related product until the stock is back.
When it comes to search engines, especially Google, both 301 and 302 redirects can pass link juice however, if the change is temporary, then using the 302 would be the better option here is why.
- Preservation of Old URL: Temporary redirects help ensure that Google retains the old URL in its search results for a longer duration.
- Avoiding Search Result Compromise: By using a temporary redirect in scenarios like service unavailability, the original URL’s standing in search results is protected and uncompromised.
Other than that, you can use the same method we used to do the 301 redirect to also take care of the 302 redirect. Also, the same Redirection WordPress plugin can be used and all that you have to do is to switch the rule to 302 from 301.
307 Redirect: “Temporary Redirect”
A 307 redirect is a successor to the 302 redirect in HTTP 1.1 protocol. Although largely treated like a 302, it’s safer to use a 301 redirect for permanent moves unless the content is genuinely moved temporarily (like during website maintenance).
Meta Refresh Redirects
Think of a landing page where you have provided a download asset to the visitor. Now, you want to take them to a different page so that they continue to learn more about your expertise. In such scenarios, you can use meta refresh where the user will be taken to a desired page after he/she spends a few seconds on the page that they initially landed on.
As a page-level redirect meta refresh doesn’t happen at the server-level like 301 or 302 redirects. It’s slower and is mostly considered less SEO-friendly when it fails to meet the user’s expectations.
They’re commonly associated with a countdown message like, “If you are not redirected in five seconds, click here.” The worst part of using Meta Refresh redirect is that it doesn’t pass any link juice, and due to this, it’s not recommended to use it on pages that you intend to rank on Google or other search engines.
Implications of Redirects in SEO
If you’re an SEO professional, there will come a time in your professional life when you have to implement redirects for websites. It can be just the redirection of a page or an entire website. Here are some of the scenarios that I’ve gone through which required me to implement 301, 302 or meta refresh redirects.
Site Revamp or Rebranding
One of the most common instances wherein you would be using redirects is when a website goes through a redesign or rebranding process.
In such scenarios, the whole domain name of the website or the URLs of a few pages may change depending upon the reassessed website requirements.
In such cases, you have to use a 301 redirect on a domain level or page level to tell Google and other search engines that the page URLs have changed, and the authority signals should be transferred to the new domain or page that has been created.
If this is not done and you end up creating a new website or a page without a redirect directive added to the old one, Google will consider the page or domain as new. This way, the website you have newly built will lose the authority it had earned while it was in the old URL.
Also, if the old URL is still live and not properly 301 redirected, this can cause duplicate content issues and further complicate things. So, make sure to use 301 redirects when changing the structure or migrating to a new domain.
301 redirects will help retain the SEO value of the old pages (though it may take at least 6 months for the whole authority juice to pass on) and guide users to the new pages seamlessly.
Temporary Maintenance, Event Pages, Product Pages
Think about this: You have a blog post that’s driving crazy amounts of traffic. But now you want that page to look better and start generating more leads.
You have the new page developed but before deployment, you want to test if it’s actually helping you achieve the goal of increased lead generation.
In such a scenario, you can do a temporary redirect of the blog to the newly designed page by adding a 302 redirect. This way, search engines would know that this is a temporary redirection and thus, the rankings of the page aren’t affected.
Another instance of using a temporary redirect is when an event expires and you want to use the same event page for another one you are hosting in a different city a month later. In such cases, you can do a 302 redirect that can guide users back to the main site without affecting the SEO value of the original page.
In fact, 302 is most commonly used by e-commerce websites when the products listed get sold out. They identify similar products and do the 302 redirects so that the users are able to find a related product instead of landing on an error or out-of-stock page.
Simplifying and Fixing Complex URLs
If you’re an SEO professional optimizing a blog, then chances are you may have already come across this issue. Most CMS platforms, including WordPress, auto-generate the URLs based on the text that’s added as the title.
However, what happens is that the title may have a year or a date that gets added to the URL, which over a period, becomes an SEO burden. Wondering how? Let me share with you a real-life experience we had here at Stan Ventures.
A few years back, when we published the Google Algorithm Update post, it had the year 2019 added to the URL. This post started performing really great. However, as we moved on to 2020, we saw lower CTR due to the wrong year in the URL. Of course, people don’t want to read the updates that happened a year back, right?
So, this called for an immediate change of the URL of the blog post and after carefully considering the repercussions, we decided to change it and add 301 to the old URL which has the year in it.
A week passed, and the new URL replaced the old one in the SERPs and the CTR of the page improved dramatically. By the way, this post is still one of the most traffic-generating ones for us.
So if you land up with a site that has a similar issue with the URL, then make sure to add the 301 and redirect to the new URL.
Temporary Redirect a User to a Live Page
Think of a scenario where your primary website is down for maintenance. However, you have hosted your blog in a subdomain and instead of greeting the users with a “Under Maintenance” page, you can use the meta refresh redirect.
You could set up a message like, ‘Our site is currently under maintenance. You will be redirected to our temporary page in five seconds. If not, click here.’ However, bear in mind that a Meta Refresh Redirect doesn’t pass any link juice. Therefore, it’s not recommended for permanent use, particularly for pages you wish to rank well on Google or other search engines.”
Redirects and SEO Best Practices
Setting up redirects is usually a server-side operation that requires technical SEO proficiency. An incorrect redirect directive can result in the website losing traction through Google and that’s why redirects have to be implemented by an expert after evaluating the pros and cons.
In most cases, using 301 redirects is the recommended method, and it has, time and again, proved to be the most SEO-friendly redirection solution. Of course, using meta refreshes and JavaScript redirects doesn’t create any issues for the users however, they may not pass SEO authority signals, and over time, this can result in huge ranking drops.
Always remember that the transfer of authority signals after implementing 301 and 302 redirects is not instant. Search engines take time to discover, recognize, and assign the authority signals to the new page. This process might take longer for pages that are rarely crawled, and according to Google, a complete transfer of authority signals may even take 6 months.
Implementing Redirects
Content management systems (CMS), the plugins, sometimes the hosting platforms, and CDN platforms provide options to manage redirects.
For more control, you can also implement redirects manually using .htaccess files on Apache servers, PHP, or JavaScript, keeping in mind the SEO implications.
However, understanding each redirect and its functions and implementing them to match with the website’s requirements is crucial for any SEO professional.
Whether you’re redirecting a few pages permanently or temporarily or an entire website from one domain to another, choosing the right type of redirect can ensure a smooth passage of authority signals. Not to forget, proper redirects also help elevate user experience, efficient crawling, and can accelerate the SEO benefits for websites.
You May Also Like
17 Reasons Why Your Page is Not Ranking on Google and How to Fix Them
Are you struggling to rank on Google after investing plenty of time and effort? It can be pretty daunting. But don’t give up just yet. Let’s look at the bright side. Sometimes, figuring out where to tap to get your content positioned in SERPs may take time. But it is definitely possible. If you can … 17 Reasons Why Your Page is Not Ranking on Google and How to Fix Them
SEO Questionnaire: 30 Essential Questions to Help Clients Better
Our SEO questionnaire features 30 essential questions to enhance your knowledge of the client and empower them with the right SEO strategy.
Outsourcing SEO: A Definitive Guide for 2024
Insourcing vs. outsourcing analysis has become one of the most contentious topics today.
Comments
1 Comment
Redirecting website URLs is a critical aspect of website maintenance, and this article covers it comprehensively. It’s a great guide for ensuring seamless navigation and preserving SEO value during URL changes.