Does rel="canonical" support protocol relative URL?
-
I need to switch a site from http to https. We gonna add 301 redirect all over the board. I also use rel="canonical" to strip some queries parameter from the index (parameter uses to identify which navigation elements were use.)
rel="canonical" can be used with relative or absolute links, but Google recommend using absolute links to minimize potential confusion or difficulties. So here my question, did you see any issue using relative protocol in rel="canonical"?
Instead of:
-
Relative URLs can be used, but it's still superior to use absolute URLs to avoid any mistakes down the line. i.e. you miss a 301 redirect on a subdirectory and both HTTP and HTTPs versions resolve.
Relative URLs can be used in a pinch, but aren't recommended.
-
You can use a relative canonical but the example you give is wrong, it should be href="/page1.html" The example you give looks like mis take 2 on this page http://googlewebmastercentral.blogspot.be/2013/04/5-common-mistakes-with-relcanonical.html
rgds
Dirk
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
-
No Follow & Rel Canon for Product Filters
Our site uses Canonicals to address duplicate content issues with product/facet filtering. example: www.mysite.com/product?color=blue Relcanon= www.mysite.com/product However, our site is also using no follow for all of the "filters" on a page (so all ?color=, etc. links are no follow). What is the benefit of utilizing the no follow on the filters if we have the rel canon in place? Is this an effort to save crawl budget? Are we giving up possible SEO juice by having the no follow and not having the crawler get to the canonical tag and subsequently reference the main page? Is this just something we just forget about? I hope we're not giving up SEO juice by
Technical SEO | | Remke0 -
Is it a good idea to use the rel canonical tag to refer to the original source?
Sometimes we place our blog post also on a external site. In this case this post is duplicated. Via the post we link to the original source but is it also possible to use the rel canonical tag on the external site? For example: The original blogpost is published on http://www.original.com/post The same blogpost is published on http:///www.duplicate.com/post. In this case is it wise to put a rel canonical on http://www.duplicate.com/post like this: ? What do you think? Thanks for help! Robert
Technical SEO | | Searchresult0 -
Rel="no follow" for All Links on a Site that Charges for Advertising
If I run a site that charges other companies for listing their products, running banner advertisements, white paper downloads, etc. does it make sense to "no follow" all of their links on my site? For example: they receive a profile page, product pages and are allowed to post press releases. Should all of their links on these pages be "no follow"? It seems like a gray area to me because the explicit advertisements will definitely be "no followed" and they are not buying links, but buying exposure. However, I still don't know the common practice for links from other parts of their "package". Thanks
Technical SEO | | zazo0 -
Crawl reveals hundreds of urls with multiple urls in the url string
The latest crawl of my site revealed hundreds of duplicate page content and duplicate page title errors. When I looked it was from a large number of urls with urls appended to them at the end. For example: http://www.test-site.com/page1.html/page14.html or http://www.test-site.com/page4.html/page12.html/page16.html some of them go on for a hundred characters. I am totally stymied, as are the people at my ISP and the person who talked to me on the phone from SEOMoz. Does anyone know what's going on? Thanks So much for any help you can offer! Jean
Technical SEO | | JeanYates0 -
Redirect non-www if using canonical url?
I have setup my website to use canonical urls on each page to point to the page i wish Google to refer to. At the moment, my non-www domain name is not redirected to www domain. Is this required if i have setup the canonical urls? This is the tag i have on my index.php page rel="canonical" href="http://www.mydomain.com.au" /> If i browse to http://mydomain.com.au should the link juice pass to http://www.armourbackups.com.au? Will this solve duplicate content problems? Thanks
Technical SEO | | blakadz0 -
Rel Canonical - Wordpress
How do you fix the rel canonical issue on a wordpress site? Is there a quick fix? I have a few notices on my site and am a little confused. Thanks, Jared
Technical SEO | | SaborStyle0 -
Canonical for non-exist URL ?
Hi I have a website what has parameter URL. For example www.example.com/index.php?page_id=1&no=2 I want that search engine see my page URL as; www.example.com/toys/cars But this URL is not exist in my website. And when i externally enter this page it goes to 404 page. If i add canonical url as www.example.com/toys/cars to the page www.example.com/index.php?page_id=1&no=2, what happened ? Is the url at the serp change as www.example.com/toys/cars ?
Technical SEO | | SEMTurkey0 -
When URL rewrite can lead to un pretty URLs
Hi Mozzers. I've a client that has done a little bit of mess rewriting the URLs of its site. In fact, also the data base driven URLs are rewritten, but the dev forgot to change the space with "-", so that now the 95% of the URLs are like this one: http://www.portalesardegna.com/search/Appartamenti e Residence/ Obviously not really a pretty URL. I am not so sure if this issue has an SEO consecuences (in fact, the site ranks pretty well also with those kind of url), but I am thinking more on usability issue. Could you suggest me any easy fix to this rewrite problem?
Technical SEO | | gfiorelli12