Saltar al contenido

8 modes to redirect a URL in WordPress

febrero 2, 2020

 

Redirecting a URL will be a task you’ll have to make more than once if you already have or are creating your WordPress website.

If you know what I mean, I summarize; basically a redirection urls is to send the user accessing a URL to a different or a group of urls to a different address.

If you do not know almost nothing about this matter you ask why you want to do that. I assure you perform these redirections is very common because on them, will improve both the SEO of your website as user experience.

In addition, when you want to redirect WordPress urls group, you simplificarás a process that could be messy and cumbersome manually.

Table of Contents

  • When redirecting a url
  • What to do with the 404s?
  • permanently delete urls When we are not worth
  • 8 Ways To Make redirections Redirecting WordPress 1. 301 2. Delete forever URL 3. Redirecting a category 4. Redirecting a URL without www to www 5. Redirect http https 6. redirections with and without / Directories 8. 7. Redirecting an entire domain
  • 1. Redirection 301
  • 2. Remove final form url
  • 3. Redirecting a category
  • 4. Redirecting a url without www to www
  • 5. Redirect http to https
  • 6. redirections with and without /
  • 7. Directories
  • 8. Redirect a whole domain
  • Conclusion
  • 1. Redirection 301
  • 2. Delete forever URL
  • 3. Redirecting a category
  • 4. Redirecting a URL without www to www
  • 5 . Redirect http to https
  • 6. Redirects with and without /
  • 7. Directories
  • 8. Redirecting an entire domain

When redirecting a url

are several cases for which you must or may be interested to make a redirect:

the possibilities are endless and many cases and codes to be used (we will see in the article).

To understand well the meaning and sense to use a redirection tell you this example.

is quite possible that when you created a page of a particular service on your website, what you called «service» or something similar. This is a major mistake because no Google searches the word «Service» and if you do, not your website appear in the top positions of search engines or chance.

The solution to this error is change the url by according to your industry and redirect a url from the old to the new.

nope !, if not redirect and simply modified the url, you are generating a 404 error, that is, someone who accesses the old url «service» will show that page does not exist.

may be thinking: What if nobody knows who is going get into it? True, but for some reason someone may have accessed this url by social networks and can even have it automatically and constantly be sharing a broken URL that does not exist.

From the point of view of the user, this is horrible, and even worse if you have not set an error page 404 by which the user can give other options to move around the web (at least one search).

Recommended Reading: How to create a perfect content for the error page 404.

The worst thing for the above example is not the usability you’re missing because it is an unusual url and probably few people have access to she. The real negative is that Google still tends constantly access to the old url.

Whenever Google access the nonexistent address will be wasting precious time that could be used in tracking pages that really are good for positioning.

In this case you should make a 301 redirect (we shall see this).

What to do with the 404s?

Very easy, Google Search Console displays errors 404 having your web.

There are many more tools to detect these errors such as Screaming Frog. Any tool you used to tell you that old url (service for example) no longer exists and that you delete.

The process to tell Google that does not exist and you have to get her out of Google results is performed in Search Console removing that URL through your choice.

is important to perform this process for all urls that have eliminated, modified or indexed by error.

Removing these urls is permanent, although reappear at the end of time as Google’s end showing and tracking again. For this reason there is to see regular coverage option in Search Console.

Let’s see how a 404 error is eliminated in this video.

What if we were wrong to designing web publishing urls that are not worth us? Let’s see what to do in that case.

When permanently delete urls not worth

us

The first time you access WordPress often make a major mistake, we start to create posts and pages that are likely to have a temporary url.

With url passing I mean you create pages that then do not use, create pages of evidence you eliminate, you’re wrong to the edit URL, modified and shorter wear, etc …

All these urls you’ve been eliminating or modifying begin indexing in Google occupying your sitemap URL is unnecessary and worst mistakes that are

404. If these urls had external links, take time with good content and Google could take advantage, ideally making a redirect to a good url text.

The problem is that these urls created are worthless.

What to do in these cases?

You should get rid of that url and tell Google that no longer exists. It makes no sense to perform a redirection urls, we do not serve. Where you’re going to redirect a url called «my tests»

have to keep in mind that if you are redirecting a URL has to go to another similar page content and, in this case, it makes no sense because it provides absolutely nothing.

You will see in the form 2 to make redirections what to do in that case because we can tell Google to remove certain urls forever.

8 Ways To Make WordPress

redirections have to know that when we talk about redirection not only give the 301 as I said.

There are many types of redirections and are more or less interesting to perform according to the needs of the web project.

* You must know that abuse of redirections, but improve the user experience and positive tracking Google, too slow a site for two reasons:

The browser has to make a double step to reach the new url. Google must also perform a double jump to see the new Redirected direction.

For this reason we must try, facing the SEO urls that do not have internal redirections, for it would always put links to the new URL.

types redirections :

  • redirections 301: 301 redirections are permanent redirections. We send notice when we use search engines to tell you that URL no longer exists and should not continue to index the page and yes do with the new.
  • redirections 301: 301 redirections are permanent redirections. We send notice when we use search engines to tell you that URL no longer exists and should not continue to index the page and yes do with the new.
  • redirections 301: 301 redirections are permanent redirections. We send notice when we use search engines to tell you that URL no longer exists and should not continue to index the page and yes do with the new.
  • 302 Redirects: are temporary. Seekers indicate that url will be redirect to another for a while. They are often used in maintenance or a product we do not have in stock.
  • 307 Redirects: Redirects 302 are in deshuso, failing that is convenient to use the
  • 307. Removing definitely urls. Redirecting

  • categories.

  • Redirects without www to www and vice versa.
  • Redirecting http to https.
  • Redirects / without /. Redirecting
  • directories. Redirects

  • entire domain.

Let’s see all types, when and how.

1. Redirecting

301

Most often perform 301 redirects for several reasons:

  • We take the potential strength of the old url (if you have some strength and bonds).
  • If a Google user accesses a broken url will go to the new not falling on a page without destiny causing it to lose less time.
  • have to know that redirections are wasting time for Google as well as they have to go from the old to the new but it is much better to do than fall into a page 404.

There are several ways to perform 301 redirects:

to perform a 301 redirect just include the following code in the htaccess:

in this video you will see the whole process with its different options.

Operation of redirections to 302 and 307 are exactly equal, changing the number used.

can do the same process through a plugin like Redirection, this in addition to an option showing 404s of your website has the option not interested, do a redirect

301. Operation is simple, different fields record the old and the new URL and go. That simple.

2. Delete forever url

might think that just going to Search Console and delete the url from appearing. As already mentioned, it is an option but the problem is that the URL displayed again and we never want to take that url (called for example «my test»).

You will have to access the .htaccess of your website and include a code.

In the same way as above, you can do it in 2 ways

The line of code is different from those established in redirections 301 since this has no destination. Google simply want to tell you delete it forever.

If for example we want to tell Google to remove the urls of «my test» simply have to include a line of code with the term «redirect gone»

This would be the code: redirect gone / url-to-remove /

For example redirect gone / mis-tests / or redirect gone / hello world /

In this video you will see how it’s done:

3. Redirecting a category

1. Imagine you want to delete the / category and leave the shorter url. You can include in the .htaccess the following code:

Thus the url of your website would be for example: instead of tusitioweb.com/category/ tusitioweb.com/ejemplo-post-1 example post-1

2. You may also want to rename base category (category) and set category or any other name. You will have to add to the .htaccess something like this:

4. Redirecting a URL without www to www

Doing this kind of redirection avoid possible duplicate content and show Google that all properties are the same.

will add to the .htaccess the following code:

If you want to redirect a version with www to non-www would be this:

5. Redirect http to https

If you have a website and just installed the certificate SSL is desirable that all your web display with https. To do this you should include in your .htaccess this rule (see before your hosting):

Hosting as Webempresa perform the entire process in a single click.

6. Redirects with and without /

may on your website have enabled the two options and this is detrimental to the SEO.

If your website is visible with the slash (/) to the end and without it, we are facing duplicate content that you can solve by applying the following rule.

To redirect version with bar to the version without bar:

To do so instead the code would look like:

7. Directories

If you count on a directory you want to redirect to another directory another name and in turn maintain the same directory structure and pages that depend on it.

1. For a first-level directory.

2. subdirectories:

8. Redirecting an entire domain

Imagine you want to change your domain name, you bought a new one and want to change .co.uk to .com for example.

To do this simply notes the following line in .htaccess:

Within the control panel of your hosting You also have this option to redirect domains to your liking.

Conclusion

Redirects are very necessary and you play with them to improve both the user experience and web positioning.

Remember not to abuse them as the double and triple redirections are not positive because it will increase loading times hurt tracking Google.

also remembers spending a tool like Screaming Frog to detect internal redirections. You have to try that redirects within a web avoid this double step.

far different ways of redirecting a url in WordPress. Start your project and apply it.