TEL: 072 380 8196
August 9, 2021

How To Implement a 301 redirect

WHAT IS AN SEO REDIRECT?

301 Redirect is also known as server-side redirect. To establish a permanent redirection, 301 redirections can be used. The 301 code indicates that a domain/page has moved permanently to a new space.

Permanent redirection notifies all visitors to your site immediately so they can correct any impacted bookmarks. This is a 301 redirection in WordPress. It redirects search engines such as Google from one URL to another. A 301 can be performed in many situations. It's usually done after you have chosen a preferred domain.

WHEN YOU SHOULD GET A 301 REDRIECT

If you want to route traffic permanently from an old URL to a new URL, 301 redirects can be useful. There are many uses for 301 redirects.

1. Reorganized URL structure
2. Redesigned or replaced site with different URLs
3. Relocated to a new domain
4. in the event of typos, secure alternative domains


Although it is not necessary, it is recommended that you first set your Preferred Domain and then your 301 redirects in WP (WordPress).
HOW TO SET YOUR PREFERRED DOMAIN WITH GOOGLE WEBMASTER TOOLS
Google Webmaster Tools - Add 2 Sites: The www- and non-www versions. Google Webmaster Tools is free.
Log in to your Google Webmaster Tool.


Let's take, for example, and your domain name is "yourdomain.com." In this case, you'll be adding these two sites to Google Webmaster Tools.


YOURDOMAIN.COM AND
www.yourdomain.com



At this stage, we are adding to the two sites. It is easier to think of them as two labels that are different from each other. Once we have added the sites, we can then choose our preferred Domain.

Site verification may be required to prove that the Domain is yours. Google will inform you.

Once you have created your sites, set the same preferred Domain for them both. You can choose between the non-www or www version to be your preferred Domain. I like the www-version as my preferred Domain.

Once you have completed that at Google Webmaster Tools, let's return to your WP Admin.
SET YOU 301 REDIRECT
There are many ways to achieve a 301 server redirect.



1. .htaccess
2. cPanel
3. WordPress (that's for WordPress self-hosted installations)


You should note that you did not want a 301 server redirect with your cPanel if you have self-hosted WordPress. As I discovered recently, it could lead to an eternal loop when you attempt to access your site.

WordPress is easy to use.

How to Create a WordPress 301 Redirect

You have, for example, installed WordPress in the root directory of your hosted Domain. We're using the same clever domain name as before: "yourdomain.com."

Next, you will need to change your preferred Domain's URL to the www version. Next, you'll want to make sure everything points to the preferred Domain via a server-side redirection. This will be done in WP (WordPress).

Go to:



WP Admin >> Settings >> Allgemein


Change the "WordPress Address" and "Site Address" from "yourdomain.com to "www.yourdomain.com,"i.e., To your preferred Domain).

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram