What Is a 301 Redirect?
In the simplest terms, a 301 redirect is code that tells the search engine you are using that the page you’re trying to reach has been permanently moved. It also signals that you want the search engine crawler to index the new page you’ve put in place, while taking the obsolete page out of the index. This is done so that duplicate content doesn’t cause your pages to be seen in a negative light.
When executed correctly, the redirect will help you keep the rankings your page has earned, while preventing duplicate content that would be created by keeping the new and old pages indexed at the same time. This helps create the best, most accurate outcome in the eyes of Google (and other search engines) when they crawl your page.
A great metaphor by which to understand 301 redirect pages is to think about the process of moving houses or apartments. When you move, you forward your mail for a while, but eventually everything comes to your new address exclusively. That’s what a 301 redirect does for traffic on the web. It’s a system put in place to make sure all traffic and visitors are driven toward the right information, while giving search engines the info they need to understand your pages.
The number 301 is special because it belongs to an important set of numbers in browser operations, called HTTP status codes. These codes are issued by the server to the browser and are meant to help users and programmers solve errors and ensure that the server is communicating properly with the client.
When 301 Redirects Are Needed
There are several instances where adding a 301 redirect is the best solution. Here are a few examples:
- You want to reorganize your site, including removing or editing the directory.
- The root domain is changing.
- Someone linked to your site incorrectly and visitors who follow this link are led to a 404 page, which you want to capitalize on.
- You want a URL that is more attractive and recognizable, i.e., a “vanity URL.”
So how do you properly implement a 301 redirect? The implementation varies somewhat depending on what software you are using, but it’s still fairly simple across the board. Here are 2 ways to set up a 301 redirect:
Redirecting Using IIHS on a Windows Server
If you are using a Windows server, you will need to use an Internet Information Services (IIS) Manager to create your redirect. Here are a few easy steps:
- Access your IIS in the Administrative Tools in the start menu.
- Locate the panel that lists all of your active sites. Select the site.
- When modules appear after selection, look for the URL Rewrite module.
- If the URL Rewrite module is absent, you will have to stop and install it.
- Open the URL Rewrite module. Select “Add Rules.”
- Go to “Inbound Rules” and select “Blank Rules.”
- Select “OK” to begin editing your Inbound Rules.
- Name the new rule something to the effect of “redirect.”
- In the Match URL Panel, set the URL in question as “Matches the Pattern.”
- Continue with regular expressions. Specify what you are redirecting.
- In the Redirect field, click “Permanent,” which will give you the 301 code.
- Click “Apply” to save changes.
- Save everything to a web.config file, so you can edit again later as needed.
Redirect Using .htaccess in Apache
Apache is a popular host server. If your site is built on the WordPress platform, it’s already using Apache behind the scenes. When you need to implement a 301 redirect in Apache, you will use .htaccess. Here are a few simple steps:
- Allow override in the Apache configuration file.
- Locate the .httaccess file, which is typically in the root web folder for the site.
- Create the .httaccess file if it doesn’t already exist in the root folder.
- Open up the FTP and login as you normally would to your site.
- Work your way through until you are in the root web folder.
- If you don’t see it, enable your FTP browser to view hidden files.
- Edit, but opt for an HTML editor rather than Notepad (use anything UNIX).
- Add a line to the .htaccessfile that tells it to 301 redirect.
- Leave a blank line at the end of the file, or add an endline character.
For a 301 redirect for just one page, you will type:
“RedirectPermanent /old-file.html http//:www.domain.com/new-file.html”
For a 301 redirect of an entire domain you will type:
“RedirectPermanent / http://www.new-domain.com/”
Other Methods for Creating a 301 Redirect
If it’s not possible for you to access the .htaccess file or server admin panel, it’s still possible to create a 301 redirect. This process works in any programming language that allows response headers to be edited. If you’re working in PHP, Java, or any other language that allows you to change the response headers, adding makeshift 301 code is as simple as adding the appropriate code at the top of each page to enforce a permanent redirect.
301 Redirects are an excellent way to send web traffic to the pages you want end-users to see, rather than merely displaying a 404 page. Also, it’s a great trick to save you from losing page rank that you have earned. Though the process for implementing a redirect is a little different for each server or language, the idea is fairly straightforward. If you still have concerns about losing page range when you implement a 301 code, know that fluctuations may occur, but they will only be temporary. Ultimately, creating a redirect will drive the traffic to the places you want it, benefiting your site and brand.
If you have further questions about 301 redirects, or require marketing or SEO auditing services, contact us today. We are happy to serve you and your website.