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
-
Canonical Issue On AMP
Hi everyone,
Intermediate & Advanced SEO | | MuhammadQasimAttari
I have one issue about canonical. kindly guide me about it. I have a site example.com/abc and I convert it on an amp and know its URLs is example.com/abc=?amp. but the search console tells me to add the proper canonical URL but both pages are the same. kindly guide me about it. what will I do?0 -
How and When Should I use Canonical Url Tags?
Pretty new to the SEO universe. But I have not used any canonical tags, just because there is not definitive source explaining exactly when and why you should use them??? Am I the only one who feels this way?
Intermediate & Advanced SEO | | greenrushdaily0 -
Duplicating content from manufacturer for client site and using canonical reference.
We manage content for many clients in the same industry, and many of them wish to keep their customers on their individualized websites (understandably). In order to do this, we have duplicated content in part from the manufacturers' pages for several "models" on the client's sites. We have put in a Canonical reference at the start of the content directing back to the manufacturer's page where we duplicated some of the content. We have only done a handful of pages while we figure out the canonical reference potential issue. So, my questions are: Is this necessary? Does this hurt, help or not do anything SEO-wise for our ranking of the site? Thanks!
Intermediate & Advanced SEO | | moz1admin1 -
Move a blog from a domain to a new domain in the same hosting server
I have the need to find the best solution to move my viverezen.org blog on new domain naturazen.org because somebody stolen my brand. Now I registererd brand NaturaZen and I am going to use this website as main and have the old viverezen just to point in the new website I dont want lose autority and more important I dont want lose the 500 visits I have everyday. Both domain are under same hosting company What is best SEO solution you can give me to help? I thought to point the hosting on new domain naturazen and put all link with redirect 301 on viverezen but probably I am wrong stuck_out_tongue thanks for your help
Intermediate & Advanced SEO | | VivereZen0 -
Adding a Canonical Tag to each page referencing itself?
Hey Mozers! I've noticed that on www.Zappos.com they have a Canonical tag on each page referencing it self. I have heard that this is a popular method but I dont see the point in canon tagging a page to its self. Any thoughts?
Intermediate & Advanced SEO | | rpaiva0 -
Huge increase in server errors and robots.txt
Hi Moz community! Wondering if someone can help? One of my clients (online fashion retailer) has been receiving huge increase in server errors (500's and 503's) over the last 6 weeks and it has got to the point where people cannot access the site because of server errors. The client has recently changed hosting companies to deal with this, and they have just told us they removed the DNS records once the name servers were changed, and they have now fixed this and are waiting for the name servers to propagate again. These errors also correlate with a huge decrease in pages blocked by robots.txt file, which makes me think someone has perhaps changed this and not told anyone... Anyone have any ideas here? It would be greatly appreciated! 🙂 I've been chasing this up with the dev agency and the hosting company for weeks, to no avail. Massive thanks in advance 🙂
Intermediate & Advanced SEO | | labelPR0 -
How Can Google tell, if a anchor text is exact match
So, I was thinking to myself today. Couldn't Google say everything is an exact match anchor text in reality? Such as, Hyundai in Boston, Or cars in boston? I'm just concerned, that's all. Thanks for your help.
Intermediate & Advanced SEO | | PeterRota0