What’s the first thing you do when you change your phone number?
That’s right, you let your contacts know of that change.
Similarly, when you change the URL of a page on your website, it’s crucial to let Google know. Otherwise, the page may be removed from the index, or you’ll end up with plenty of users landing on a 404 page when they click on your website’s link on Google.
And how to do that, you ask?
Using redirects, of course!
Simply put, redirects are a way to send users and search engines to a different URL than the one they originally requested. You may need to do that in one of the following scenarios:
- You’re changing the domain name of your website
- You need to merge or split content on your website
- Your company is rebranding and you need to reflect the new brand in the URLs of different pages
- You want to include a new keyword in the URL for SEO purposes
- You removed a page but don’t want your users to land on a 404 page
There are several types of redirects, including:
HTTP status code redirects are server-side redirects. That means that they’re processed by the server and that they instruct the browser to load the new URL directly (as opposed to loading the old page first and then asking the browser to open the new URL, which is the case for client-side redirects). Server-side redirects can be easily cached by the browser, improving performance and reducing server load.
These redirects are well known amongst webmasters, mainly because they’re effortless to set up, especially if you’re using WordPress.
There are several types of HTTP, or server-side, redirects, but the most notable (and known) ones are 301 and 302 redirects.
A 301 redirect is a permanent redirect. It tells Google and other search engines that the original URL has been permanently moved to the new location.
This type of redirect is the most SEO-friendly, as it passes along most of the link equity (or link juice) from the original URL to the new one.
A 302 redirect is a temporary redirect that indicates that the original URL has been moved temporarily to the new location.
This type of redirect does not pass along link equity and is not recommended for long-term use.
This type of redirect is executed on the client side, rather than the server side like a 301 or 302 redirect.
So, what’s the difference between the two types?
- You don’t have access to your server configuration or .htaccess file
- You’re performing additional checks or validation before redirecting using HTTP status code redirection
- It’s being done as part of an A/B test
To better explain what we just said, think of redirects as doors. On the left, we have an HTTP redirect, which tells Google from the get-go that the URL for the page has changed and that the Googlebot should head to the new URL.
Want even more proof that you should prioritise other redirection methods?
Well, to do so, we recommend using the function [
<html> <head> <script> window.location.replace("https://www.rockstarmarketing.co.uk/"); </script> </head> </html>
window.location.href], which can get the user stuck in a back-button loop. That’s because if the href method is used and the current page’s location is added to the navigation history, when the user clicks back, the browser will redirect them back to the same page they were just trying to leave. That will result in a UX redirect loop/trap, and force the user to close the tab after having such a negative experience with the website.
How to add that code to WordPress
To add that code to any page you want to redirect, you’ll have to install the “Insert Headers and Footers” WordPress plugin.
Next, open the plugin’s settings from the WP dashboard’s left menu.
Finally, insert the code there. Voila!
When you use a redirect, search engines will follow it to the new URL and index the new page instead of the original one. That can result in the original page being removed from the search engine’s index, which can negatively impact its rankings. That’s why you should tread carefully when it comes to redirection.
If you must redirect a page to a new URL you can probably do so using HTTP instead of Js. If that’s the case, go with that option. After all, as mentioned, it’s generally best to use a 301 redirect to pass along as much authority as possible.
So, how to do that?
Well, the process is super easy thanks to WordPress plugins like Redirection, 301 Redirects, and any of the popular SEO plugins (Yoast, All-In-One SEO, Rank Math, etc.), all of which allow you to change the URL of any page.
As mentioned above, it is generally recommended to use a 301 redirect for permanent redirects. That’s because it passes along the most link authority.
Chain redirects occur when one redirect leads to another redirect, which leads to another, and so on. This can create confusion for search engines and result in a loss of link authority.
When redirecting a page, it’s essential to avoid chain redirects. Instead, redirect directly from the original URL to the final destination.
If you are redirecting a page that is linked to from other pages on your website, it’s important to update those internal links to point to the new URL. That will help search engines crawl and index your website more efficiently and avoid any potential crawl errors.
If you can’t use a HTTP redirect and need to use a Js one, consider using rel=”canonical” tags. That will help search engines understand the relationship between the original and redirected pages.
This can help prevent the original page from being removed from the search engine’s index and may help preserve some of its link juice.
Add the new page to the XML sitemap