Sometimes the web pages have to be removed and due to various reasons, you may want to change your URLs. This cannot be avoided and if you delete a page without anything else you can run into issues. You need to put a redirect to stop visits to the page.
Usually, in most cases, you need to implement a 301 redirect. A 301 redirect is a permanent direct take user to the new URL when the original page does not exist longer.
What is a 301 redirect?
A 301 redirect is used when you want to forward your domain to another destination URL. When the users type in the domain in the address bar the 301 redirects will send the visitors to the destination URL. The new URL will show up in the browser address bar.
The 301 redirect is a way to tell the search engines that your domain has been permanently moved to the new URL. You can change or remove the 301 redirects anytime so it is not a permanent change. You can change it later on.
The 301 redirect tells the search engines where the current content of your domain exists and the search engine shows the correct information in the search results.
You can create a 301 permanent redirect anytime you need and the search engine will learn the new address permanently. The redirect preserves your search engine rankings and all the effort you have put into SEO. The search rankings are transferred to the new destination.
Why should you use 301 redirects?
The 301 redirects are used when a page is no longer relevant and has to be removed. They can be used during site rebuilds where the newer URLs are used. It is essential to redirect old URLs that will not stay the same as you rebuild your website.
They are mainly used when:
- Moving to a new domain.
- When you want to clean dynamic URLs and redirect them to shorter and SEO-friendly URLs.
- When you want to avoid duplicate content problems. For example, when you have multiple blogs written on the same topic and you need to consolidate them into a single blog post.
How are the 301 redirects implemented?
The 301 redirects can be implemented differently depending on the server and the CMS you use.
301 redirects - Apache servers
If you are using Apache servers then you can edit your htaccess file and implement the 301 redirects. You can go to the root of your site via an FTP client to understand how you should implement the htaccess redirects.
For example, 301 htaccess redirects can be implemented as follows:
Redirect a single page - Redirect 301 /old page/ /new-page/
Redirect the entire domain to another - Redirect 301 / http://www.yourwebsite.com/
Redirect an entire website to a subfolder - Redirect 301 / http://www.website.com/subfolder/
Redirect a subfolder to a different domain - Redirect 301 /subfolder http://www.newebsite.com/
301 redirects - Nginx
When you use Nginx you can implement the redirect in the .conf file that is located at the root of your server.
301 redirects - Windows server
If your site uses the Windows server in ASP.NET you can add the redirects in the web.config file which is located in the site root.
301 redirects - WordPress websites
You can easily implement 301 redirects on WordPress websites. You can use a plug-in like Yoast SEO and use the built-in redirect manager. The most popular redirect manager currently used for WordPress websites is ‘Redirection’.
301 redirects - Magento stores
The functionality to use the 301 redirects is built into the platform.
301 redirects - Shopify stores
Implementing 301 redirects on Shopify stores is straightforward. You just have to go to the ‘URL Redirects’ link and click it to create URL redirects.
301 redirect - BigCommerce
To add the redirects you can navigate to the server setting and select ‘301 Redirects’. Here add the redirect and the old URL.
What situation do the 310 redirects are commonly used in?
The 301 redirects are commonly used in the following situations:
- You change the URL of your page.
- You want to consolidate the pages on the same topic.
- You have changed a subfolder’s URL.
- You move a subdomain to a subfolder.
- You have changed domain names.
- You have switched from HTTP to HTTPS.
- Anytime the content moves, you want to ensure that the search engine and visitors do not encounter 404 pages. You can use the redirects.