Mobile app version of vmapp.org
Login or Join
Alves908

: Difference between redirect and rewrite in .htaccess (in relation to SEO and the canonical tag) Okay so if I'm wanting to remove the extension of a URL but my canonical tags point to the url

@Alves908

Posted in: #301Redirect #CanonicalUrl #Htaccess #Redirects #UrlRewriting

Okay so if I'm wanting to remove the extension of a URL but my canonical tags point to the url with the extension I can't use a 301 redirect without it negatively affecting SEO.

Does the same go for a url rewrite? Or can I use rewrite without it negatively affecting SEO? From what I found, a rewrite seems to only change the url in the url bar.

Assuming that this is correct, if someone were to copy the URL, would they copy the rewritten URL or would they copy the original?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Alves908

1 Comments

Sorted by latest first Latest Oldest Best

 

@Correia994

If your canonical tag points to the URL with the extension then is what search engines will cache and index. So the URL with the extension will be in the search results.

But you have to ask yourself this, If search engines cannot see any internal links with the exception of the canonical URL on your site, what value would they place on a page if the site doesn't link to it themselves.


Does the same go for a url rewrite? Or can I use rewrite without it
negatively affecting SEO? From what I found, a rewrite seems to only
change the url in the url bar.


If you rewrite the URL then without a a canonical URL will create a new page in search engines eye.
With the URL extension URL as the canonical then as mentioned above this will be the page search engines will cache.

So by sounds of it, you should stick with the URLs with the extension throughout the site and forget about rewrites and 301s.


Assuming that this is correct, if someone were to copy the URL, would
they copy the rewritten URL or would they copy the original?


If using a rewrite, they will be copying the rewritten URL. So by them doing this will mean they link to a page that Google doesn't have indexed as the canonical is pointing to the URL extension.

Just to note, Google doesn't really take note or have a preference over URLs with and without extensions.
@WilliamHarvey

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme