Tuesday, August 26, 2008

How to redirect a webpage

If you have an old website and you want to redirect to the new website without having to tell the users to click on a link here is how to do it.There are two methods one being the famous redirect 301 and the other the refresh meta redirect.Each of them has their pros and cons.

How to redirect using 301
This is the most popular and the best method to redirect your pages and the good thing is you keep the same search engine rankings such as page rank on your new page or site.
To use this you have to have server access so this cannot be done for blogspot blogs.
Here is how to do it;
1.Create a new .htaccess file or modify the existing one using notepad.To create an .htaccess file just open notepad and save it as .htaccess without any extension such as .txt
2.Place the following codes in the .htaccess file
redirect 301 /index.html http://www.YOURWEBSITE.com/index.html

N.B-To redirect ALL files on your domain use this in your
.htaccess file if you are on a unix web server:

redirectMatch 301 ^(.*)$ http://www.domain.com

After you are done upload the file to your root folder

How to redirect using refresh meta redirect
This is much easier but the problem is that some search engines consider it spamming as both the old and the new site will be indexed.
1.To use it just add the following code to your head section prefferably with the rest of your meta content such as meta tags and description

If you want to redirect your blogspot blog this is the only way to do it.

If you have any problems using these methods you can contact me and I will help you out