Questions tagged [canonical-link]

is a keyword for the HTML attribute `rel` which allows specification of the preferred URL for web pages with duplicate content.

canonical is a HTML rel keyword to prevent duplicate content issues by specifying the preferred ("canonical") version of a web page URL. It is supported by Google, Yahoo, Bing and other search engines. It is described in RFC 6596.

408 questions
4
votes
1 answer

301 redirect vs canonical links?

For technical reasons on a site we may have two or more links that refer to the same product page. For example: http://example.com/a-nice-product-no1234.html and: http://example.com/a-nice-foobar-product-no1234.html Apparently the first one is the…
Lachezar Balev
  • 11,498
  • 9
  • 49
  • 72
4
votes
5 answers

Redirect to canonical route in without trailing slash in Rails 3

On Rails 3, I'm trying to redirect from a URL without a trailing slash to the canonical URL that has a slash. match "/test", :to => redirect("/test/") However, the route above matches both /test and /test/ causing a redirect loop. How do I make it…
4
votes
2 answers

Canonicalization in Rails - routing or .htaccess?

I have a site that is about to launch and a request for URL Canonicalization has been made. I want to know what is the best way to have all requests for http://www.example.com to permanently redirect (301) to http://example.com within my RoR app?…
Matt
  • 1,539
  • 1
  • 11
  • 16
4
votes
2 answers

How to get a canonical url for a dynamically generated urls on rails?

I implemented canonical url for homepage as follows: I added this line I added this line on index.html.erb in header section. It is working fine. Now I have dynamic routes generating line as…
user3576036
  • 1,335
  • 2
  • 23
  • 51
4
votes
1 answer

disable wp-admin to wp-login canonical redirect (wordpress)

I am building a website, with wordpress+buddypress (latest version). In this website, I have my own custom login|signup|resetpass forms, and I do not want to link them to back-end wp-forms. I have blocked the back-end forms for all users (default…
Poofy
  • 43
  • 1
  • 1
  • 5
4
votes
3 answers

Pretty URLs Vs. Duplicate Content

I'm trying to clear up a grey area about this much talked about topic... Like most devs, I've made some pretty URLs with mod_rewrite. My sites internal links point to the pretty URLs and things are working nicely. But, I can still access the old…
Adam
  • 1,098
  • 1
  • 8
  • 17
4
votes
0 answers

Google caches different domain than specified in canonical

We have two different websites, www.humidordiscount.com and www.humidordiscount.co.uk showing pretty much the same content but with slight differences (currency, contact info, etc) one aiming for US/global market and the other for the UK. Canonical…
4
votes
2 answers

Desktop, mobile and AMP versions of website

I have a web site www.example.com and the relative mobile version in m.example.com and now I have the AMP version in amp.example.com. From www.example.com I have redirect to m.example.it for mobile device and I use for AMP page:
Lorenzo
  • 41
  • 2
4
votes
1 answer

Canonical Link as a Way of Fighting Scrapers?

Let's say several external sites are scraping/harvesting your content and posting it as their own. Let's also say that you maintain a single unique/permanent URL for each piece of content, so that content aliasing (on your site) is never an…
user2189331
4
votes
0 answers

How do I define/change BigCommerce's rel canonical link functionality?

Currently BigCommerce does a pretty good job at defining the canonical link for pages. But I am looking to update the behaviour for product list pages and remove the page number out of the link. Currently it behaves as /category/?page=1,…
4
votes
2 answers

Can I include canonical URLs in sitemap for SEO?

Can I include canonical URLs in sitemaps for SEO? For example www.example.com/url.html is a duplicate page of www.example2.com/url.html. So I used following tag in www.example.com/url.html page for SEO not to be penalized by search engines:
Lingesh
  • 65
  • 1
  • 7
4
votes
1 answer

Get Current Page Url In Adobe CQ5 for Canonical Link

Is there a standard way in Adobe CQ5 to get the current page url in order to create automatic canonical links in the head of the JSP? Basically we have a dialogue config box where you can override the canonical link, but by default if this is empty…
Darius
  • 5,180
  • 5
  • 47
  • 62
4
votes
2 answers

if canonical mode is not set, nonblocking read fails?

Below code is an example of nonblocking read of terminal IO, however when I type a character on the console, it doesn't immediately print it out. Perpaps you will say I should priviously set stty -icanon, so canonical mode is disabled, that indeed…
stonestrong
  • 337
  • 1
  • 5
  • 13
4
votes
5 answers

If a URL contains a quote how do you specify the rel=canonical value?

Say the path of your URL is: /thisisa"quote/helloworld/ Then how do you create the rel=canonical URL? Is this kosher? UPDATE To clarify, I'm getting a form submission, I need to…
joedevon
  • 2,649
  • 4
  • 28
  • 43
4
votes
1 answer

echo a product attribute in magento head.phtml

I am trying to set my own custom canonical links in Magento for products through the use of a custom attribute but I cannot get the attribute to echo in the head.phtml file. This is what I have so far. Please can anybody help?
user2179269
  • 63
  • 1
  • 5
1 2
3
27 28