BusinessWebsite Success

The Monster of Website Optimization – The Redirects Monster

Want create site? Find Free WordPress Themes and plugins.

Whether a relaunch with a new domain or a change in Content Management System, redirecting is always necessary when websites are being restructured.

But beware. Too many detours and too many redirects are just what the redirects monster is hoping for!

If a URL has to be changed, implementing redirects is necessary for the website to remain functional. There are two different types of redirects: the HTTP redirects 301 and 302, and client redirects, for example JavaScript redirects. Google sees a nearly identical code on the original site as on the target site of the redirect.

The 301 redirect (“moved permanently”) is most frequently used. It communicates to the Googlebot: “Contents that were to be found in this place have been permanently moved” – to a new domain or another URL. Thus, as with the 302 redirect, the advantage of the 301 redirect lies in the fact that the referring links are passed on. The more valuable links your site has, the more important this is for a continually good ranking. This is important, for example, when a shop item has been removed – without a redirect, a 404 error site will be generated. Search engines follow status codes blindly and they need your changes in status code in order to be able crawl your site anew. This accelerates the indexing process.

Nevertheless, when websites are redirected multiple times, this is a sign that the redirects monster has taken over your website. This then influences the loading time, and annoyed readers will find the desired information only via detours. Put the monster in its place by not redirecting URLs more than once.

Your .htaccess File – Guaranteed Monster-Proof!

Ideally, you would solve the redirect problem in the .htaccess file. This configuration file is stored as a text document in the main directory, thus on the same level as the index.php or index.htm sites. In this file, you can create settings for the domain and sub-directories and introduce detours.

They contain important commands for the server:

  • RewriteEngine On -> “Redirect/rewrite URL”
  • RewriteBase / -> “Use this directory”
  • RewriteRule -> “Redirect from site A to site B”.

Minimal word count – maximal effect: If in your relaunch you have decided to move to an entirely new domain, place this tiny file in your root directory. The code reads:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^http://olddomain.com [NC]RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]

If the subpage www.domain.com/subpagea.html is redirected to www.domain.com/subpageb.html, the .htaccess file for the server appears as follows:

RewriteEngine On
RewriteBase /
RewriteRule subpageea.html subpageb.html [R=301]

If your domain www.examplepage.com can also be reached via examplepage.com, you have the problem of duplicate contents, because, for Google, these are two different URLs that show the same contents. You can prevent this by forwarding all URLs to the www. version. In addition, it is sensible to give the referred domain names in the Google Search Console under “Website Settings.”

Then, use an editor create an .htaccess file and enter the following code:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^http://olddomain.com [NC]
RewriteRule ^(.*)$ http://neqdomain.com/$1 [R=301,L]

As an interim solution, the 302 redirect can be used if a site can be found temporarily under another web address. The command in the .htaccess file then reads:

RewriteEngine On
RewriteBase /
RewriteRule oldpage.html newpage.html [R=302]

Check Your Redirects with Ryte

If you suspect that the redirects monster could be on your website, Ryte can help you. You can check whether your configured redirects are functioning and whether the .htaccess is correctly programmed. Here you will learn whether there are syntax errors or whether you have loaded the file in the correct directory. You will also learn whether the rules on file relate to the desired directory and whether the correct type of redirecting is given.

In Ryte’s module Website Success, under “Indexability,” click on “Redirects” and then on “Status Codes.” Here, you have a clear overview of your redirects. To see a list of each different type of redirect, click on the respective box.

status codes report redirects

Figure 1: Status codes report in Ryte’s module Website Success

If you you click on the report “Target Categorization” in the report, you can see the following information:

  • To which website your original URLs redirected
  • Whether your redirecting forwards to a different directory or subdomain

Figure 2: Check redirect targets with Ryte

Conclusion

After changes to your URL structure or for a relaunch, the 301 redirect via .htaccess is an optimal way to avoid losing traffic and to transmit valuable links. Users are reliably forwarded from the old URL to the new URL, and search engines know that the content can be found under a new address. In this way, the new sites are indexed more quickly by Google and the old ones removed. If you regularly check your website with Ryte after making any necessary changes, you will defeat the redirects monster.

Have You Met the Other Monsters of Website Optimization?

The Internal Linking Monster
The Slow Page Speed Monster
The Duplicate Content Monster
The Bad Canonical Tag Monster
The Orphan Page Monster
The 404 Monster
The Thin Content Monster
The Missing ALT Tags Monster
The Hreflang Monster

Fight off the Redirects Monster with Ryte – analyze your website for FREE

Start now!

Did you find apk for android? You can find new Free Android Games and apps.
Advertisements
Show More

Related Articles

Close
Close