Temporary website redirect: 3xx or php/meta?

Temporary website redirect: 3xx or php/meta? - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Temporary website redirect: 3xx or php/meta? error on your web browser. Problem :


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


Solution :

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.



PHP:



header('Location: /forum', true, 307);
exit;


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.


We hope that this article has helped you resolve the seo, redirects, http-headers error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=