← Back to all status codes
3xx Series
Safe to retry

301 Moved Permanently

This and all future requests should be directed to the given URI.

🌍

SEO Impact

Highly beneficial when changing URLs. Search engines will pass most/all link equity to the destination and replace the old URL in the index.

🔧

Common Causes

  • 1Site migration
  • 2URL structure changes
  • 3HTTP to HTTPS redirect

Code Examples

Node.js (Next.js)
return NextResponse.redirect(newUrl, 301);
Nginx
return 301 https://$host$request_uri;

Related Codes