Sometimes you’ll want to change your websites structure - Changing the domain name, changing Page Names, changing file extensions and various other structure changes. Some people will just simply use a PHP location command with no headers, some may just use a Meta Refresh tab in the HTML to redirect. However, this isn’t the SEO-Optimized way to do it.
If you want to change your structure, you will need to use a 301 Redirect. You can do this through a .htaccess file or simply through PHP. Either works fine.
First off, the .htaccess method. If you login to FTP and see that you don’t have a .htaccess file in the root of your files (Normally where all the public files are), then you can simply create one. Now, open up this file and enter this:
Redirect permanent / http://www.yourwebsite.com
Redirect permanent /old.html http://www.yourwebsite.com/new.html
This is just two examples of the 301. The first will redirect the whole content to the new URL. The second one will redirect from your old HTML page to new.html. Once you put this code in the .htaccess file, you should be able to go to the old page and it should redirect you to the new page. If this happens, then you know that this has been setup correctly, in the Search Engine Friendly way.
Now, the PHP method. With this you could replace your content in the PHP files with the following:
<?php Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: http://www.yourwebsite.com” );?>
This will once again redirect you to the new website/webpage, and also it will send the 301 header through too, which is also the Search Engine Friendly way.
The best way to do this 301 Redirect is to do the .htaccess redirect because this would be usable by most whereas not as many use PHP files than .htaccess. To use .htaccess though, the server needs to have Apache installed.
In conclusion, if you want to do a Redirect, you should definately do a 301 Redirect because it doesn’t take much extra time and it will make your website as Search Engine Friendly as possible.
Related Posts:- Cloaking Affiliate Links...
- Easy Way to Make Money!...
- Dynamic URLs vs Static URLs...
- Make Money with Torrents!...
- Basic SEO Web Page Optimization...
Related posts brought to you by Yet Another Related Posts Plugin.




Comments
[...] public links >> 301 301 Redirect Saved by raz78 on Tue [...]
htaccess redirect is the most SEO friendly way to redirect URLs. However, most people tend to forget that it’s also the most user friendly method. This allows instant redirects since the web server reads the htaccess file before showing the web page. This prevents you from losing visitors due to long web page loading times. Great Article!