302 Moved Temporarily or 301?

302 Moved Temporarily or 301? - 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 302 Moved Temporarily or 301? error on your web browser. Problem :


HTTP status code checker tool shows HTTP/1.1 302 Moved Temporarily for the home page URL http://someurl.com (just a namesake URL). Also, this URL opens up http://www.someurl.com/general/index.



As you can see, a no-www URL to a www URL redirect is happening.



My questions are:




  1. Is a 302 redirect acceptable for the home page?

  2. Will this affect the site showing up in search results in anyway?

  3. Isn't redirection to /general/index a bad practice?


Solution :

If you want to redirect example.com => www.example.com (or vice versa), then use a 301. If you want to redirect the root URL to an internal path, www.example.com => www.example.com/general/index then use a 302.



The internal redirection isn't necessary a bad practice. Sometimes CMS impose this redirect because the CMS package needs to be installed in subfolders and/or generates a custom homepage URL.



Please don't do 302 redirect for your home page. I would prefer that you do a 301 redirect.



You can also use Google Webmaster Tools to set up your preferred domain.



Those are the answers to your question:




  1. In this case you should use a 301 (permanent redirect) because this is a definitive change of the behavior of that URL

  2. This will not affect your website in anyway. The search engine will still be able to index your pages in the right way. They, of course, will update your old homepage with the new one (/general/index)

  3. It's not a bad practice but in my opinion you should change this behavios simply using an .htaccess. So the incoming request to the old index will be served by the new homepage.


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=