EmicoEcommerce / Magento2Tweakwise-archived

Magento 2 module for Tweakwise integration
Other
9 stars 25 forks source link

Use absolute URLS in the href #106

Closed rlaven closed 4 years ago

rlaven commented 4 years ago

Issue Brief

For SEO purposes it would be nice for the Tweakwise module to use absolute URL's in the href it creates for the filters. The usage of absolute URL's is recommended by Yoast for example (see: https://developer.yoast.com/relative-urls-issues/).

Environment

Steps to reproduce

Actual result The module generates a href with a relative url, for example: /category/blue

Expected result

The module generates a href with a absolute url, for example: https://www.webshop.com/category/blue

edwinljacobs commented 4 years ago

As far as I am aware the use of relative urls does not incur a SEO penalty. One can argue about style but that is not enough to constitute a change. Seo is also a very debated subject where there are a lot of different opinions on exactly these kinds of matters.

The article you refer to is also roughly 7,5 years old. To address some of the points in the article: 1) A completely indexed test environment. If this is the case you have more problems then the relative urls in the module. Any test environment should be shut off from the outside world. 2) Spider traps, we dont use "../something" urls, all the urls are relative to the domain so this will not be an issue. 3) Relative canonical URLs, The point here is that if we have some subdomain serving the content then we would want to use the "primary" domain in the canonical url. Suppose we would use the full url then if our code is run under the subdomain then the filter urls would still contain that subdomain. As such it does not matter. I dont see a generic way to make this code domain aware. 4) protocol relative urls, If the site in question has a http version then in this day and age i would recommend fixing that as that would incur far greater seo penalties.

If you disagree with my points feel free to add practical cases / arguments so they can be debated but as is I do not see a reason to change this behavior.