What is a 301 Redirect?
If you need to change the URL of a page as it is shown in search engine results, Google recommends 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. A 301 redirect is a status code that instructs search engines that a page/post has permanently moved to a new location. It asks the search engines to transfer prior SEO history to the new piece of content and at the same time it pushes website traffic to this new location.When to Use a 301 Redirect
- You’ve moved your site to a new domain and you want to make sure both traffic and SEO history is routed to the new destination.
- You’ve changed a URL (page, post, product, category, etc.) and you want your existing PageRank* to transfer to the new URL.
- You’ve changed a URL and you want your traffic to the old URL rerouted to the new URL.
- You’re merging two websites and want to make sure that links to outdated URLs are redirected to the correct pages.
Setting Up 301 Redirects
There are multiple ways to set up 301 redirects. Some are geared towards developers, while others are more user friendly and perfect for end users. There are the three methods we tend to use and recommend: .htaccess File To implement a 301 redirect for websites that are hosted on servers running Apache, you’ll need access to your server’s .htaccess file. For non-programmers, this can be a bit scary. While my coding team effortlessly manages .htaccess files, they scare me beyond words.
htaccess file 301 redirect example