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
-
"Noindex, follow" for thin pages?
Hey there Mozzers, I have a question regarding Thin pages. Unfortunately, we have Thin pages, almost empty to be honest. I have the idea to ask the dev team to do "noindex, follow" on these pages. What do you think? Has someone faced this situation before? Will appreciate your input!
Technical SEO | | Europarl_SEO_Team0 -
Should summary pages have the rel canonical set to the full article?
My site has tons of summary pages, Whether for a PDF download, a landing page or for an article. There is a summary page, that explains the asset and contains a link to the actual asset. My question is that if the summary page is just summary of an article with a "click here to read full article" button, Should I set the rel canonical on the summary page to go to the full article? Thanks,
Technical SEO | | Autoboof0 -
Canonical URLs and screen scraping
So a little question here. I was looking into a module to help implement canonical URLs on a certain CMS and I came a cross a snarky comment about relative vs. absolute URLs being used. This person was insistent that relative URLs are fine and absolute URLs are only for people who don't know what they are doing. My question is, if using relative URLs, doesn't it make it easier to have your content scraped? After all, if you do get your content scraped at least it would point back to your site if using absolute URLs, right? Am I missing something or is my thinking OK on this? Any feedback is much appreciated!
Technical SEO | | friendlymachine0 -
Will a "blog=example "parameter at the end of my URLs affect google's crawling them?
For example, I'm wondering if www.example.com/blog/blog-post is better than www.example.com/blog/blog-post?blog=example? I'm currently using the www.example.com/blog/blog-post?blog=example structure as our canonical page for content. I'm also wondering, if the parameter doesn't affect crawling, if it would hurt rankings in any way. Thanks!
Technical SEO | | Intridea0 -
Does using tags instead of " " good for SEO purposes?
I'm currently using <pr>tags for paragraphs and came across an article that said it is better for search engines to see the</pr> tag than
Technical SEO | | ibex
tag to separate paragraphs.0 -
Can Search Engines Read "incorrect" urls?
I know that ideally a url should be something of the nature domain.com/topic, but if the url contains additional characters, for example, domain.com/topic?keyword, can the search engines still understand the complete words in the domain? Even though there are additional "incorrect" characters? Or do they stop "reading" once they find odd characters? Thanks!
Technical SEO | | nicole.healthline0 -
Should I use a "-", ":", or "|" in the title tag?
Out of habit, I've always put a "-" or dash to separate items in the title tag. However, I've noticed that more and more sites are using either a ":" or "|" in the title. Is there one that is better to use than the other?
Technical SEO | | beeneeb0