Skip to content
  1. Home
  2. Inbound Marketing and Sales Blog

Steps to set up 301 redirects

Index Content

It may be the first time you have seen this concept, but if you have a website, it is very likely that you will have to consider configuring this redirection at some point.

Don't worry if you don't know what it is and how to configure 301 redirects, in this post we explain it all to you. Keep reading so you won't be left with any doubts!

what is a 301 redirect?

A 301 redirect is an action that indicates a permanent change from one location to another on a web page. In other words, when a user enters a URL that no longer exists, they are automatically redirected to another one.

With 301 redirects you tell the browser that this particular domain has been permanently removed and where you want users to go, so if you perform this process correctly the browser will automatically redirect your visitors to the new address.

There are many circumstances in which you can apply this type of redirection, here are the most common ones:

  • when you make a domain change
  • when you change a URL to make it more user-friendly
  • when you create or update content
  • when you make a change of structure in the architecture of the website
  • to solve or avoid problems with duplicate content
  • when migrating from "http" to "https".
  • to solve cannibalisation between two or more websites
  • when you delete a landing page that you have launched for a specific campaign that is no longer active

301 redirects are not permanently active, as Google recognises the new domain after a while, but it is advisable to wait between 6 months to a year to remove the redirect.

how to configure a 301 redirect?

We will tell you about the different ways to configure 301 redirects:

Redirect in .htaccess

This is the most complicated way, but following the steps you can do it without problems. To make a 301 redirect with this method you have to edit the .htaccess file. But how is it done?

If you don't know the data to access this file, you have to contact your hosting provider to get the necessary information to access the server via FTP. Once you have it, you have to download the .htaccess file that is inside the html folder.

When this file is downloaded, a file will open with a text editor, where you will change the code. The commands will depend on what you need. We recommend that you make a backup copy before making any changes.

Here are some examples of the most common codes:

  • redirect a URL to a new one:

Redirect 301 /old-url https://nombredetusitioweb.com/nueva-url

  • redirect an old domain to a new one:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^old-site.com [NC,OR]

RewriteCond %{HTTP_HOST} ^www.sitioanterior.com [NC]

RewriteRule ^(.*)$ https://nuevositio.com/$1 [L,R=301,NC]

  • redirect an entire domain from HTTP to HTTPS:

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

https redirect

Cómo-han-cambiado-las-aplicaciones-la-vida-de-las-personas

Redirects using a CMS

A CMS (content management system) is a software that helps to manage all the content of a given website.

Depending on the CMS used it will be in a different way, we tell you how to do it from Hubspot. The steps are simple:

  1. the first thing is to have an account on this platform, once you have it created you just have to log in and enter the configuration part.
  2. look for the "URL redirects" tab and then click on "Add URL redirects".
  3. here you can select the type of redirection you want: standard, if you want to redirect a specific UPR to another one, or flexible, if the URLs are updated according to their structure.
  4. in the next step you only have to enter the old URL and the URL you want to redirect to.
  5. finally, in the "more options" section you must select the type of redirection you want, as there is not only 301, but also 302 redirections.

Redirection in Wordpress

Surely you know wordpress, as it is the most popular platform for creating blogs and websites. If your website is created here you can make the URL redirection with a plugins, which is very comfortable if you do not have programming knowledge or have hired a CMS service.

The procedure is similar to the previous one, you open the tool and add the old URL and the new one. The most popular wordpress plugins to make redirects are:

  • 301 Redirects
  • redirection
  • wP 404 Autodirect to similar post
  • yoast SEO

wordpress-logo-1

Now you know what these redirects are all about and how you can set up your own. It might be a bit tricky at first, especially from the .htaccess, but if you follow the steps you can do it without any problem. But as we mentioned, it's best to make a backup copy in case it happens.

Now it's your turn, don't be afraid to perform this technique on your website if you need to.

we hope we've helped you and that you've enjoyed reading this!

Nueva llamada a la acción

You can be interested as well...

what is an adblocker and how does it work? what is an adblocker and how does it work?
how to improve SEO with URL design? how to improve SEO with URL design?
what does status code 301 302 mean? what does status code 301 302 mean?