Exact Syntax for Canonical to PDFs for Windows Server
-
Hi There,
I have got in my web several PDFs with the same content of the HTML version. Thus I need to set up a canonical for each of them in order to avoid duplicate content.
In particular, I need to know how to write the exact syntax for the windows server (web.config) in order to implement the canonical to PDF. I surfed the web but it seems I cannot find this piece of info anywhere
Thanks a lot!!
-
Thanks Paul
I had a look at the page, but as I can see it uses headers to identify the response, but the actions are rewrite or redirect. There is a custom response you can use,
for a definitive answer I would ask on iis.net http://forums.iis.net/
Or you could place each pdf in its own folder and place the header on the folder
-
To implement a canonical tag for an individual page/file in IIS, you need to insert a custom response header via an outbound rule in the IIS Rewrite module, not through the web.config.
Sorry I don't have a specific example handy (haven't had to wrassle with IIS in some time). I'll see if I can dig one up.
Meanwhile, here's a link to the relevant section of the general Rewrite Module info in case maybe Alan can suggest the specifics.
Paul
-
Thanks for finding that, I see it says url, but I cant see how that is actually done. All it does it create a web.config in the folder you choose, I found no way of doing it ofr the indervidual file, unless you have only one file per forder
here is the web.config, how to test it works?
<configuration><system.webserver><httpprotocol><customheaders><add name="CononicalUrl" value="Link: http:/domain.com/my.pdf; rel=canonical"></add></customheaders></httpprotocol></system.webserver></configuration>
-
Not according to this doc:
http://technet.microsoft.com/en-us/library/cc753812(v=ws.10).aspx
"Levels
The procedures for configuring HTTP headers can be performed at the following levels in IIS:
-
Web Server
-
Site
-
Application
-
Physical and virtual directories
-
File (URL)"
-
-
My mistake
-
I don't think this can be done in web.config. I don't think it can be done at all.
while you can add a canonical header, to a folder using IIS, you cant add if to a file.
-
He's on a windows server and there is no .htaccess, you use web.config.
-
Hi, I believe your question is answered here via .htaccess file rather than web.config. Moz blog: How To: Advanced rel="canonical" HTTP Headers
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
More than 20 % of exact match anchor text... can it be the reason ?
How do I know if i got it by penguin because my external anchor text is over optimised ? I have 80 external links and 22 of those are exact match, could it be the reason why I went from ranking 1 st for years on a keyword to ranking on 2 nd page for about a year now... Do you recommend trying to get new links or asking to change the existing one... I read that google doesn't treat links the same way if you change the anchor text, is it really the case ? For internal links should I also worry about exact match percentage or not ? is it better to have exact match internally or not ? PS : I redid my website in the meantime so it is hard to say where the issue is coming from. Thank you,
Intermediate & Advanced SEO | | seoanalytics0 -
Safely change canonical URL many times
Hi, We are actually working on a new product information section for our network of websites (site A, B, C and D) where product landing pages allow to download information in pdf format and are active for downloads during a period of two months (active form for commercial reasons) with a unique URL (the case today). Here is a possible scenario for these product landing pages in the near future: Product is promoted in website A during 2 months (January to February) so canonical URL = A/page. Once expired, the product info. download form disappears. Customer decides to promote the same product in the same site A as well in site B from April to May so canonical URL will still be A/page. Canonical URL of B/page will point to A/page. Customer decides to relaunch his product promotion this time in site C from July to August so canonical URLs of pages A/page and B/page will now point to C/page as the latter will be the only product campaign active with a download form At the end of the year the customer does another campaign for the same product this time in website D so we will change the canonical URL of pages A/page, B/page and C/page to D/page as the latter will be the only product campaign active with a download form The obvious question here is: will this way of changing canonical URLs dynamically hurt the SEO of the section, pages, one particular website or the whole network ? Would it be better and safer to just keep the first canonical URL forever? A/page in this example Thanks so much for your input on this.
Intermediate & Advanced SEO | | JulienLetellier0 -
Thinking about not indexing PDFs on a product page
Our product pages generate a PDF version of the page in a different layout. This is done for 2 reasons, it's been the standard across similar industries and to help customers print them when working with the product. So there is a use when it comes to the customer but search? I've thought about this a lot and my thinking is why index the PDF at all? Only allow the HTML page to be indexed. The PDF files are in a subdomain, so I can easily no index them. The way I see it, I'm reducing duplicate content On the flip side, it is hosted in a subdomain, so the PDF appearing when a HTML page doesn't, is another way of gaining real estate. If it appears with the HTML page, more estate coverage. Anyone else done this? My knowledge tells me this could be a good thing, might even iron out any backlinks from being generated to the PDF and lead to more HTML backlinks Can PDFs solely exist as a form of data accessible once on the page and not relevant to search engines. I find them a bane when they are on a subdomain.
Intermediate & Advanced SEO | | Bio-RadAbs0 -
Moving hosting to another company/server . What about SEO?
Hi, We have been experiencing issues with our hosting company and want to move the hosting to someone else. One problem was that we did Isapi rewrite rule but the company moved to mod rewrite and they never adjusted the rewrite rules. We are considering a move to another hosting company - would that hurt rankings? Are there any SEO considerations to think about when switching to another host?
Intermediate & Advanced SEO | | alexkatalkin0 -
Should I use rel=canonical on similar product pages.
I'm thinking of using rel=canonical for similar products on my site. Say I'm selling pens and they are al very similar. I.e. a big pen in blue, a pack of 5 blue bic pens, a pack of 10, 50, 100 etc. should I rel=canonical them all to the best seller as its almost impossible to make the pages unique. (I realise the best I realise these should be attributes and not products but I'm sure you get my point) It seems sensible to have one master canonical page for bic pens on a site that has a great description video content and good images plus linked articles etc rather than loads of duplicate looking pages. love to hear thoughts from the Moz community.
Intermediate & Advanced SEO | | mark_baird0 -
Rel=canonical on image pages
Hi, Im working on a Wordpress hosted blog site. I recently did a "site:search" in Google for a specific article page to make sure it was getting crawled, and it returned three separate URLs in the search results. One was the article page, and the other two were the URLs that hosted the images that are found in the article. Would you suggest adding the rel=canonical tag to the pages that host the images so they point back to the actual context article page? Or are they fine being left alone? Thank you!
Intermediate & Advanced SEO | | dbfrench0 -
Solving Keyword Cannibalisation WITHOUT exact match internal links
Hi guys, I have an ecommerce client I'm working with (they are a tour operator). The client has multiple variations of very very similar tours which has created a keyword cannibalisation issue. I've read this blog from Rand on the issue, and I understand that I need to use internal links to show the bots which page I want to rank for which term. Problem is, I cant use exact match anchor text as it wouldn't adequately describe the tour from a user's perspective. eg I want a single page to rank for 'Los Angeles Tour' however, because the tour also takes in san francisco, I cant use the exact match anchor text 'Los Angeles Tour' because it doesn't give users a realistic indication of the page that they are going to. My solution... Is to use the internal linking structure eg 'San Francisco & Los Angeles Tour', This has the keyword phrase I want to optimise for within the anchor text. Does this have the same effect as using the exact match anchor text? I cant really see any other solution, so I'm guessing that s the right course of action Your thoughts would be much appreciated
Intermediate & Advanced SEO | | jamesjackson0 -
Is having a canonical tag for the link that IS the canonical a negative thing?
Throughout our site, canonical tags have been added where needed. However, the canonical tags are also included for the canonical itself. For example, for www.askaquestion.com, the canonical tag has been added as www.askaquestion.com. Will this have a negative impact or does it not really matter whether there is such a loop?
Intermediate & Advanced SEO | | kbbseo0