How to Set Up 301 Redirects (Apache, Nginx, WordPress)

Redirect deleted or moved pages correctly.

Apache

Add to .htaccess: Redirect 301 /old-page /new-page

Nginx

Inside the server block: location = /old-page { return 301 /new-page; }

WordPress

Use a redirect plugin or your host's redirect manager.

Rules

Redirect to the closest equivalent page, not the homepage. Avoid redirect chains.

Check your site now

Run a free scan of up to 25 pages. No signup needed.

Free broken link scan →

Related