I run a (small) news website which has also a forum in a subfolder of the root. I'm planning to give the site a facelift and a code restructuration, so I wanted to put some redirect on the home page that will point directly to forum's index (www.mysite.com --> www.mysite.com/forum) while I tinker with it. And that, given the little free time I have, will take no less than a couple of month. Being a news site I'm pretty sure that would affect it's overall ranking, but I need to do it, so: which is the best way to redirect? I pondered and read here and there about the different means, but I couldn't figure out which is worst for SEO. Do I use a 302 redirect or use "Location:newurl" in page headers using php? Or I just put a meta tag in the html page (or a javascript, what's better). Sorry but I'm not really into these things, I may have said something silly, I know... Thanks

2 Answers 2


Do a 307 temporary redirect on the server side. You can do this with PHP or .htaccess, it doesn't matter which. But definitely make sure you send the 307 header as that is what tells the search engines the redirect is temporary and to try again later. Without it they will consider the pages removed which is exactly what you don't want.


header('Location: /forum', true, 307);
  • Never heard about 307, so do you think it's the optimal one for a 2-month span of time? Commented Feb 10, 2011 at 13:35
  • "Normally, when a Web browser issues a POST request and then receives a 302-Object Moved redirect message from the Web server, the browser issues a GET request for the new location and loses the data in the POST request. With a 307 redirect, the browser reissues the POST request with the original data to the new location." Not necessery in your situation, I think, but can't hurt. Commented Feb 10, 2011 at 13:54
  • @Damien, two months is a long time but I don't see why this won't work. I'd Google around just to see if anyone has posted any useful data on temporary redirects for this long just to be sure, tho.
    – John Conde
    Commented Feb 10, 2011 at 14:03

SEO-wise it's not advised to use a meta-refresh or javascript, because they will not pass pagerank and it'll just evaporate. Instead, use a 302 redirect (htacess or php header()). This will ensure that the original homepage maintains it's pagerank while it's under construction.

But really, can't you tinker with it on a test environment and just upload it to the live website once you're done? That's a lot more SEO-efficient.

  • Yeah, you have a good point there; but I thought that, given the little time I have to dedicate to the site, leaving it there, rarely updated, without new features and so on would have been "bad". I thought it would have been better to just redirect to the forum (where much of the people converge anyway). But mayb you're right, I should leave it there as is... Commented Feb 10, 2011 at 14:04
  • 2
    Actually, since 2007 Google has started treating meta-refresh as a 301 redirect if there's no delay, and as a 302 if there is some sort of delay. JavaScript redirects are also treated as 302 if a search engine detects it, but it's not as well supported. Still, it's better to avoid meta or javascript redirects and just use the correct status codes. And Litso's suggestion of developing the new site in a test environment is best. Commented Feb 10, 2011 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.