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
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
-
Rel=canonical on Godaddy Website builder
Hey crew! First off this is a last resort asking this question here. Godaddy has not been able to help so I need my Moz Fam on this one. So common problem My crawl report is showing I have duplicate home pages www.answer2cancer.org and www.answer2cancer.org/home.html I understand this is a common issue with apache webservers which is why the wonderful rel=canonical tag was created! I don't want to go through the hassle of a 301 redirect of course for such a simple issue. Now here's the issue. Godaddy website builder does not make any sense to me. In wordpress I could just go add the tag to the head in the back end. But no such thing exist in godaddy. You have to do this weird drag and drop html block and drag it somewhere on the site and plug in the code. I think putting before the code instead of just putting it in there. So I did that but when I publish and inspect in chrome I cannot see the tag in the head! This is confusing I know. the guy at godaddy didn't stand a chance lol. Anyway much love for any replies!
Technical SEO | | Answer2cancer0 -
Can i use "nofollow" tag on product page (duplicated content)?
Hi, im working on my webstore SEO. I got descriptions from official seller like "Bosch". I got more than 15.000 items so i cant create unique content for each product. Can i use nofollow tag for each product and create great content on category pages? I dont wanna lose rankings because duplicated content. Thank you for help!
Technical SEO | | pejtupizdo0 -
What is the recommended or "best practice" Permalink Structure?
I have always been under the impression that by connecting pages to their parent pages as described in a.) below is best practice and makes sense to me. a.) yoursite.com/category/sub-category/product/ b.) yoursite.com/product But then i also understand the importance in terms of link juice being spread out across so many sub pages, and by using Example b.) you keep the link juice in tact. Your thoughts on this? Greg
Technical SEO | | AndreVanKets0 -
Two "Twin" Domains Responding to Web Requests
I do not understand this point in my Campaign Set-Up. They are the same site as fas as I understand Can anyone help please? Quote from SEOMOZ "We have detected that the domain www.neuronlearning.eu and the domain neuronlearning.eu both respond to web requests and do not redirect. Having two "twin" domains that both resolve forces them to battle for SERP positions, making your SEO efforts less effective. We suggest redirecting one, then entering the other here." thanks John
Technical SEO | | johnneuron0 -
Is rel=canonical needed for URLs with Google Analytics query strings?
If a page URL has Google Analytics query strings, does the page need a canonical tag? e.g., something.com/?utm_source=newsletter&utm_campaign=mar-2013-nsl I have rel=canonical on all our pages because some of them will be accessed via URLs that have non-Google strings. The strings are only for marketing purposes, not for identifying a specific page to display. e.g., something.com/?source=acme Should I only implement the canonical tag on the pages that might have non-Google marketing strings in the URL?
Technical SEO | | WayneBlankenbeckler0 -
Rel=Canonical Header Location
Hello, I've been trying to get our rel=canonical issues sorted out. A fellow named Ayaz very kindly pointed out that I'm trying to put the code into the wysisyg editor, but this might not be the best place to put the code. We are using Drupal 6. Where do I insert the code? head> <link rel="canonical" href="http://www.example.com/blog/my-awesome-blog-post"> Thanks!
Technical SEO | | OTSEO0 -
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