Change page URLs with 301 redirects
If you need to change the URL of a page as it is shown in search engine results, we recommend that you use a server-side 301 redirect. This is the best way to ensure that users and search engines are directed to the correct page. The 301 status code means that a page has permanently moved to a new location.
301 redirects are particularly useful in the following circumstances:
- You've moved your site to a new domain, and you want to make the transition as seamless as possible.
- People access your site through several different URLs. If, for example, your home page
can be reached in multiple ways (for instance,
http://www.example.com) it's a good idea to pick one of those URLs as your preferred (canonical) destination, and use 301 redirects to send traffic from the other URLs to your preferred URL.
- You're merging two websites and want to make sure that links to outdated URLs are redirected to the correct pages.
- You removed a page and you want to send users to a new page.
The implementation of 301 redirects depends on your hosting and server environment.
If you have access to your web server configuration files, you may be able to write the redirect rules yourself. Follow your web server's guides:
- Apache: Consult the Apache .htaccess Tutorial and the Apache URL Rewriting Guide.
- NGINX: Read about Creating NGINX Rewrite Rules on the NGINX blog.
- For all other web servers, check with your server manager or hoster, or search for guides on your favorite search engine (for example: search for "LiteSpeed redirects").
If you're using a platform like Blogger or Shopify, the platform may already have built-in redirect solutions. Try searching for help articles (for example, search for "blogger 301 redirects").