Mobile app version of vmapp.org
Login or Join
Carla537

: Does purposely linking to an invalid URL and then using 301 affect SEO? On a section of my site, I am currently using .htaccess rewrites to put the ID as part of the URL instead of in the

@Carla537

Posted in: #301Redirect #ModRewrite #Seo

On a section of my site, I am currently using .htaccess rewrites to put the ID as part of the URL instead of in the query, like so:

RewriteRule ^([a-z_]+)?/?tours/([0-9]+)/(.*) /tours/tour_text.php?lang=&id=&urlstr= [L]


For example, if someone goes to /en/tours/12/some-text-here it will rewrite it to /tours/tour_text.php?lang=en&id=12&urlstr=some-text-here. However I don't want the users to be able to put just any text, so if they type in the wrong some-text-here part it will 301 redirect them to the right page.

This works perfectly, but I can see a potential problem arising when localizing the website, so I just wanted to make sure it's not actually a problem.

How it is now, if someone goes to /en/tours/12/some-text-here, the anchor to the Spanish version of that page will be /es/tours/12/some-text-here (i.e. only changing the "en" to "es"), and then the script will then 301 them to the correct Spanish text (something like /es/tours/12/algun-texto-aqui). And the reverse will also be the same. The anchor on the Spanish version to the English version would be /en/tours/12/algun-texto-aqui and then they will be forwarded with 301 back to /en/tours/12/some-text-here. Basically, the anchor changes the language and the 301 changes the string at the end.

So I have two questions:


Does purposely and permanently having invalid URLs on your site that get 301'ed to the correct ones have any effect on SEO? I could make it just show the correct URL to begin with, but this is a significant amount of work due to how I am handling the translations, so I would prefer just to 301 them.
Will the invalid URLs that are contained in the links be added to the search engine indexes even if they get 301'ed to another page?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Carla537

3 Comments

Sorted by latest first Latest Oldest Best

 

@Gloria169

What you are using there (the user helpful text at the end of the URL) are know as "slugs". One good way of handling those is through the use of the "canonical" meta tag, for example on this page, the question title is in the URL, but isn't completely needed, so there is a canonical link in the source:

<link rel="canonical"
href="http://webmasters.stackexchange.com/questions/54799/does-purposely-linking-to-an-invalid-url-and-then-using-301-affect-seo" />


However you'll notice that there is also a 301 redirect to the full URL in place, and Google recommend this alongside the canonical link.

10% popularity Vote Up Vote Down


 

@Megan663

You won't be able to have both your Swedish content and your English content crawled and indexed by Googlebot like that. You don't say how your are determining language. Googlebot doesn't send accept-language headers, so your redirects may not even work for Googlebot. If you are redirecting based on geographic location of the IP address, Googlebot will always get the English version.

The SEO problems with your setup are:


You should not use parameters for selecting language. Domain, sub-domain, and directory are the SEO approved ways of choosing language.
You should not automatically choose the language for users. Users need to be able to switch manually when your algorithm gets it wrong in cases like:


Travelling abroad and using local computers
International users with English browsers (very common)
Inaccuracies in geo-IP databases (also very common)

Googlebot needs to be able to crawl the site in all languages.


For more information see: How should I structure my URLs for both SEO and localization?

10% popularity Vote Up Vote Down


 

@Cooney921

Does purposely and permanently having invalid URLs on your site that
get 301'ed to the correct ones have any effect on SEO? I could make it
just show the correct URL to begin with, but this is a significant
amount of work due to how I am handling the translations, so I would
prefer just to 301 them.


Arguably, yes. According to Google, a 301 redirect will pass about 85-90% of PageRank, which is about the same as an ordinary link. If every link on your site 301 redirects before reaching its destination, that effect is multiplied, i.e., if we assume 15% reduction, the destination page ends up with about 13% less PageRank than it otherwise would have (85% of 85% = ~72%).

It also adds unnecessarily to the total page load time which, depending how fast your server is, may have a perceptible negative effect for users which may have indirect SEO effects (see ShopZilla case study). If it's really slow, there's a chance of direct SEO effects in Google as page speed is a (very small) part of their ranking algorithm.

A final consideration that may compound both of the above, it sounds like your example links between /es/ and /en/ will encounter 2 redirects - once to the Spanish spelling, and again to add your parameter string. If that's right, then the multiplication is greater, i.e., the destination ends up with about 24% less PageRank, slower load, etc.


Will the invalid URLs that are contained in the links be added to the
search engine indexes even if they get 301'ed to another page?


No. Search engines should only index the destination of the 301 (Google example here).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme