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
-
Canonical URL Change
Hi, I have a Product Page, say www.example.com/product-title/.
Technical SEO | | viatrading1
Canonical URL is www.example.com/product-title/ I want to change its URL to www.example.com/product-title-2/
Canonical URL is www.example.com/product-title-2/
Can't do 301 Redirect. Is SEO Juice passed from www.example.com/product-title/ to www.example.com/product-title-2/ ? Thanks,0 -
Rel Canonical, Follow/No Follow in htaccess?
Very quick question, are rel canonical, follow/no follow tags, etc. written in the htaccess file?
Technical SEO | | moon-boots0 -
"Equity sculpting" with internal nofollow links
I’ve been trying a couple of new site auditor services this week and they have both flagged the fact that I have some nofollow links to internal pages. I see this subject has popped up from time to time in this community. I also found a 2013 Matt Cutts video on the subject: https://searchenginewatch.com/sew/news/2298312/matt-cutts-you-dont-have-to-nofollow-internal-links At a couple of SEO conferences I’ve attended this year, I was advised that nofollow on internal links can be useful so as not to squander link juice on secondary (but necessary) pages. I suspect many websites have a lot of internal links in their footers and are sharing the love with pages which don’t really need to be boosted. These pages can still be indexed but not given a helping hand to rank by strong pages. This “equity sculpting” (I made that up) seems to make sense to me, but am I missing something? Examples of these secondary pages include login pages, site maps (human readable), policies – arguably even the general contact page. Thoughts? Regards,
Technical SEO | | Warren_Vick
Warren1 -
Canonicals
We have a client that has his products listed on 20+ different websites, including 4 of his own. Also, he only has 1 of everything, so once he sells it then the product is gone. To battle this duplication issue, plus having a short internet lifespan of less than 4 weeks, I was wondering if it would be a good idea to canonical the products back to the category page. Kind of like using canonical tags on your "used blue widget" and "used red widget" pages back to the "used widgets" page. Would this help with the duplicate content issues? Is this a proper use of a canonical?
Technical SEO | | WhoWuddaThunk0 -
Can name="author" register as a link?
Hi all, We're seeing a very strange result in Google Webmaster tools. In "Links to your site", there is a site which we had nothing to do with (i.e. we didn't design or build it) showing over 1600 links to our site! I've checked the site several times now, and the only reference to us is in the rel="author" tag. Clearly the agency that did their design / SEO have nicked our meta, forgetting to delete or change the author tag!! There are literally no other references to us on this site, there hasn't every been (to our knowledge, at least) and so I'm very puzzled as to why Google thinks there are 1600+ links pointing to us. The only thing I can think of is that Google will recognise name="author" content as a link... seems strange, though. Plus the content="" only contains our company name, not our URL. Can anybody shed any light on this for me? Thanks guys!
Technical SEO | | RiceMedia0 -
Is there a work around for Rel Canonical without header access?
In my work as an SEO writer, I work closely with web designers and usually have behind the scenes access. However, the last three clients who hired me have web designers that are not allowing admin access to anyone else (including the clients) outside of their companies/small business. Is there a work around for the Rel Canonical element that usually is placed in the header? I am using All-In-One-SEO plug-in to address part of this issue. Sage advice or discussion on this is appreciated!
Technical SEO | | TheARKlady0 -
Why am i still getting duplicate page title warnings after implementing canonical URLS?
Hi there, i'm having some trouble understanding why I'm still getting duplicate page title warnings on pages that have the rel=canonical attribute. For example: this page is the relative url http://www.resnet.us/directory/auditor/az/89/home-energy-raters-hers-raters/1 and http://www.resnet.us/directory/auditor/az/89/home-energy-raters-hers-raters/2 is the second page of this parsed list which is linking back to the first page using rel=canonical. i have over 300 pages like this!! what should i do SEOmoz GURUS? how do i remedy this problem? is it a problem?
Technical SEO | | fourthdimensioninc0