Which HTTP status code indicates that a requested web page has been permanently moved to a new location?
- A.500
- B.302
- C.404
- D.301
Show answer
Correct answer: D. 301
Explanation
The correct answer is D, 301. A 301 reply means Moved Permanently: the page now lives at a new address and the browser or search engine should use that address from now on. HTTP status codes come in classes. Codes in the 200s mean success, the 300s mean redirection, the 400s mean the client made a mistake and the 500s mean the server failed. Because 301 is permanent, browsers remember it and search engines pass the old page's standing to the new address, which is why a website uses 301 when a web address changes for good. Option A is wrong because 500 is Internal Server Error, a fault on the server side. Option B is wrong because 302 is Found, a temporary redirect, so clients keep asking the old address. Option C is wrong because 404 is Not Found, which means no page exists at that address at all. Exam tip: 301 permanent redirect, 302 temporary redirect, 404 not found, 500 server error.