Another question I get constantly is. How I do I safely redirect pages on my server? With an apache web server this can be very simple.
First do you have an .htaccess file in the root of your web server?
Yes? Don’t read this next line
No? Don’t worry, just make your own.
The syntax is really quite simple
Default redirect command will use a 302 action. For example
Redirect /oldpage.html http://www.destination.com/newpage.html
If you wish to use a 301, the SAFEST redirect and will tell the search engines that you have moved the page permanently.
Redirect permanent /oldpage.html http://www.new.com/page.html
These types of redirects are done within the header of the html file. The header is the part of the page you do not see with view source. These are the commands that the browser and or search engine uses to display the page correctly. DO NOT EVER use a java script based redirect, or a META refresh redirect! These are commonly used as spam or cloaking methods.
You can identify a META refresh by this command in the HEAD part of an HTML document.
<meta http-equiv=”refresh” content=”2;url=http://www.mynewpage.com”>
Appropriate
The number in the content= area, is the amount of time for the refresh to happen.
I have seen dozens of variation of .js redirecting, you can always ask me if you need one identified.
Recent Comments