Will the Google ranking of my page increase when I use a meta refresh with a timer of 2 seconds instead of a 302 redirect without a timer?
I'm using this code:
<meta http-equiv="refresh" content="2; url=http://example.com/" />
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.Sign up to join this community
I wish I could use your idea of meta refresh as well, but in today's society, you want to cause your server to fabricate the following HTTP header for a redirect (where URL after Location is the new URL):
HTTP/1.1 301 Moved Permanently Location: http://example.com
This can be done in PHP by the following code:
<?php header("HTTP/1.1 301 Moved Permanently",true); header("Location: http://example.com",true); ?>
The advantage here is speed because the header is picked up right away where as the meta tag is picked up several bytes later in the code plus there is no delay with this method.
If you want to continue to help guests who use browsers that don't support automatic refresh, then you can use a PHP script like the following:
<?php header("HTTP/1.1 301 Moved Permanently",true); header("Location: http://example.com",true); ?> <html> <head> <title>Moved</title> </head> <body> <h1>Moved</h1> <a href="http://example.com">Access Document here</a> </body> </html>
That way, guests of old browsers will instead see a link that they can click on to access the new document.
To help with your ranking, modify your sitemap files so that the URLs point to actual content pages, instead of pages that redirect to content so that search engines don't do unnecessary crawling.