NEW SUPPORT LINE (South Africa only): SMS your support request (FIRST WORD MUST BE SUPPORT) to 072 532 1530

Testing your 301 permanent redirect

Posted in SEO on 2012-10-16

This is a follow up post to the blog Domain parking with 301 redirect. This blog will show you how to test that things are working correctly. Of course, you could just type in the domain which must redirect and then when it does redirect to the main domain you have a fairly good idea its worked, but you may want to double check what's actually happening.

 

To do that, we'll look at the HTTP headers sent back from the web server. There is more than one way of doing this, I'll only show one of them, but feel free to leave a comment if you have a different method.

 

We'll use telnet to access our webserver, much the way your web browser does behind the scenes.

 

Step by step guide to use telnet to view HTTP headers:

In this example, our main domain is PHP-Web-Host.com. We have a secondary domain name, softsmart.co.za which redirect to PHP-Web-Host.com, so you'll obviously just need to change the domains you use to suit your own use.

 

  • Open a command prompt. In windows, you can do so by clicking on the programs menu or by typing cmd into the run box, and pressing enter.

       

       

 

 

      Or by typing cmd:

 

      

 

 

 

 

  •  In the command prompt window, type "telnet softsmart.co.za 80" and press enter, without the quotes and putting your secondary domain name in there instead of ours (it will still work as an example if you use ours)

 

         

 

  • As soon as you hit enter and it connects to the web server, the telnet window will go blank. It will stay blank so you won't be able to see what you're typing, so type very carefully.
  • Type "GET / HTTP\1.1" and press enter (again, without the qoutes)
  • Now type "Host: softsmart.co.za" and PRESS ENTER TWICE!!!! (again without the qoutes!!!).

 

 

      You should now get a reply from the web server which looks similar to the following:

 

      

 

Notice in the headers section highlighted above we see "HTTP/1.1 301 Moved Permanently", as well as "Location: http://www.php-web-host.com". That tells us that the web page is being directed with a 301 permanent redirect, which is exactly what we want for SEO!

 

We're now confident that our 301 has worked, YAY!

 

Please leave your comments or questions below, we love to hear from you. If you use a different method to achieve the same thing we'd like to know too...

 

Comments

Add your comment

Display Name:
Web Address:
Email Address: (not displayed)

Comment

SSL Certificate Authority Paypal Verified We accept PayPal

 
 
  © Free, easy content management system
HOME | WEB DEVELOPMENT | WEB HOSTING | SOFTWARE | RESELLERS | SEO | GENERAL | AFFILIATES | RESELLER 50GB | RESELLER 100GB | RESELLER 150GB | RESELLER 200GB | VPS
 
Some policy info