301 Server Code


A "301" is a status code that is returned by a website's server when accessing a URL that has been moved. Just like mail forwarding, a 301 specifies a permanent "change of address" for a page/file which has been moved. A 301 indicates a permanent redirection whereas a 302 indicates a temporary redirection. Related: 200 Server Code, 302 Server Code, 404 Server Code, 500 Server Code

Examples

Redirect from WWW to Non-WWW

html
RewriteEngine On RewriteBase /

Redirect from Non-WWW to WWW

html
RewriteEngine On

CSS

css
.highlight {