Вопрос

I was just wondering, I use a .htaccess script to strip the file extensions from my URL's

Would the canonical tag, which is the direct URL you want to user to see contain the file extensions for example;

 mysite.co.uk/locations/regions/thislocation.html

Example of how my actual url would look;

    <link rel="canonical" href="http://mysite.co.uk/locations/regions/thislocation"/>

Would the canonical tag be set up with the above URL or with the file extension?

Это было полезно?

Решение

The canonical URL should represent the URL you want the user to visit (and see in their address bar), not one that only exists as a side-effect of your implementation (the point of it is to stop the .html version being indexed by search engines).

Другие советы

@anubhava You have to setup a canonical tag without extension.Because google crawls a URL which shows in you Header.

therefore Link will be : <link rel="canonical" href="http://mysite.co.uk/locations/regions/thislocation"/>

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top