SEO & HTTP Status Codes
A good URL should always return status code 200. A good SEO redirect should always return 301 (beware of 302 redirects - see below).
You can also use this tool to find broken links (which return 404 status codes).
HTTP Code List
The most common HTTP status codes and how they relate to SEO:
- 200 OK
- A good URL should always return 200. This means that the browser found the URL and the server returns a good content page.
Warning!If a page inaccurately returns 200, (ie. the page actually doesn't exist and should return 404 Page not Found), it should be fixed (check .htaccess and rewriterules). Otherwise, it can hurt your SEO because Google won't be able to tell the difference between good pages and non-existent pages. It can create duplicate content on your site, which can lead to a penalty.
- 301 Moved Permanently
- To move a page (or entire website), always use 301 redirects for good SEO. This tells Google to follow the new website. It transfers all the backlinks received by the old page to the new page. Make your 301 status redirects from .htaccess (using RewriteRule ... [R=301,L]) or PHP header(...).
- 302 Found
- A lot of redirects are done like this. They are bad redirects for SEO because link juice is lost. Instead, use 301 redirects to preserve link juice.
- 404 Not Found
- It's a good idea to see what pages return 404 and fix them (by either creating the missing page, or by 301 redirect it the URL to a page that does exist).
For a list of all status codes, you can check Wikipedia.
Also you may want to read Common HTTP Header Error codes and fixes.