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
8
votes
3 answers

How does creating a canonical URL based on the current URL do any good?

I have an MVC3 app written in C# that I'd like to generate rel=canonical tags for. In searching SO for ways to achieve this automatically, I came across this post. I implemented it in my dev environment and it works as intended and generates tags…
Scott
  • 13,735
  • 20
  • 94
  • 152
7
votes
3 answers

Adding rel and title to ASP.NET MVC Action Links

I decided primarily for SEO reasons to add the "rel" to my action link, but am not sure that the way I have gone about this is going to follow "best practices." I simply created a new Extension method as shown below. Is this the best way to go…
RSolberg
  • 26,821
  • 23
  • 116
  • 160
7
votes
2 answers

Canonical links and paging

Google has been pushing its new canonical link feature, I agree it is really useful. Now instead of having a ton of entry points in to an area you can have one entry. I was wondering, does this feature play nice with paging? For example: I have…
Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
6
votes
3 answers

How to configure redirects to url with trailing slash in nginx?

I want to redirect URLs without slash to the path with trailing slash. So /some-url to /some-url/ And the rest of the URLs, like /some-url.xml /some-url? /some-url?q=v /some-url/ Should stay without redirection. I found this article…
Pawel
  • 466
  • 1
  • 7
  • 20
6
votes
1 answer

Java file canonicalPath with tailing '.. ' leads to inconsistent behavior

I'm currently investigating in some pathTraversal related security mechanisms and came across a weird behavior of java.io.File.getCanonicalPath(). I thought CanonicalPath will always represent the true unique path of the abstract underlying File.…
guitarlum
  • 588
  • 4
  • 9
6
votes
1 answer

In angular 2 how do you make the canonical tag in the index.html page dynamically change

In angular 2 how do you make the canonical tag in the index.html page dynamic so I can share page urls with social media. This is it currently:
AngularM
  • 15,982
  • 28
  • 94
  • 169
6
votes
1 answer

GitHub Pages and Jekyll content duplication and SEO issues

I'm looking at using GitHub Pages to host my blog and Jekyll to present it. Presumably, whatever I commit will appear at .github.io through Jekyll and at https://github.com//.github.io in rawer form. See this page…
guypursey
  • 3,114
  • 3
  • 24
  • 42
6
votes
1 answer

Registration ID duplication for GCM

We have an app that uses GCM. When user firstly opens the app,app checks the shared preferences to look whether user is registered previously.if not the registration id is taken from GCM and stored to shared preferences. There is also a 3rd party…
Murat
  • 3,084
  • 37
  • 55
6
votes
2 answers

Specify custom canonical URL in WordPress Post

We operate 1000's of websites, most of them are are made for specific sports events. Currently we have our writers write to all of them specifically for unique content. However we have 2 major sites that cover all events in their verticals; and we…
SEOGuy
  • 81
  • 1
  • 1
  • 4
5
votes
1 answer

In angular 2 how can I make the canonical tag dynamic per page

In angular 2 how can I make the canonical tag dynamic per page. This is my index page tag for it: How can I make it dynamic e.g. if on blog page it should look like this at run time: …
AngularM
  • 15,982
  • 28
  • 94
  • 169
5
votes
2 answers

Canonical huffman encoding algo

Hello I am trying to implement Canonical huffman encoding but i dont understand wiki and google guides, I need explain more abstractly... I tried this: 1. Get list of regular huffman encoding length's codes. like this: A - code: 110, length: 3. B -…
user165210
  • 292
  • 4
  • 18
5
votes
2 answers

Replace existing canonical tag with javascript or jquery

I'm wanting to create a widget for Adobe Muse that replaces the canonical tags that Muse automatically generates. I know that this will not work with most bots because they don't run any scripts when crawling pages, but I have read that Google's…
John R Perry
  • 3,916
  • 2
  • 38
  • 62
5
votes
1 answer

IIS 7 Multiple Domain Home Page Canonical Redirect

In our web.config file we control 6 different international domains. How do we do the following with 1…
Brent
  • 67
  • 6
5
votes
2 answers

Can I have multiple rel="alternate" tags for a webpage?

In My site I have used rel="alternate" for RSS as follows Now I want to add another rel="alternate" tag for the mobile site as
Miuranga
  • 2,463
  • 10
  • 51
  • 81
5
votes
3 answers

How to add canonical tag the pages that are derived from same link?

I am using symfony 1.0.6. In my site I have two URLs. http://newe4s.com/news/articles/view/033/job-news-and-information and http://newe4s.com/news/articles/view/033/job-news-and-information/graduate/Connections-help-graduates-get-jobs Now, all…
Manoj H
  • 145
  • 2
  • 12
1
2
3
27 28