Using http: shorthand inside canonical tag ("//" instead of "http:") can cause harm?
-
HI,
I am planning to launch a new site, and shortly after to move to HTTPS. to save the need to change over 5,000 canonical tags in pages the webmaster suggested we implement inside the rel canonical "//" instead of the absolute path, would that do any damage or be a problem?
oranges-south-dakota" />
-
I agree,
you should avoid them at all.
-
Hi Peter,
That is true, it appears however the question is if it is okay to use relative paths.
In which Google says:
"...Avoid errors: use absolute paths rather than relative paths with the
rel="canonical"
link element.Use this structure:
https://www.example.com/dresses/green/greendresss.html
Not this structure:/dresses/green/greendress.html
).."REF: https://support.google.com/webmasters/answer/139066?hl=en
I always side on the better to be safe side of things.
Cheers,
Don
-
Don,
this isn't relative path. This is "protocol free". So if domain is blah.com HTTP page will have canonical as http://blah.com and HTTPS page will have canonical as https://blah.com.
-
Hi Po,
No, you can not or should not use "relative" paths in the URL. They are not properly indexed you should use the absolute path.
Ref: Google: https://googlewebmastercentral.blogspot.com/2013/04/5-common-mistakes-with-relcanonical.html
You can use parameters in ASP or PHP to get the path for you.
PHP example: http://stackoverflow.com/questions/6768793/get-the-full-url-in-php
ASP example: http://stackoverflow.com/questions/567590/asp-net-absolute-path-of-a-urlHope this helps,
Don
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
-
Added a canonical ref tag and SERPs tanked, should we change it back?
My client's CMS uses an internal linking structure that includes index.php at the end of the URLs. The site also works using SEO-friendly URLs without index.php, so the SEO tool identified a duplicate content issue. Their marketing team thought the pages with index.php would have better link equity and rank higher, so they added a canonical ref tag, making the index.php version of the pages the canonical page. As a result, the site dropped in the rankings by a LOT and has not recovered in the last 3-months. It appears that Google had automatically selected the SEO-friendly URLs as the canonical page, and by switching, it re-indexed the entire site. The question we have is, should they change it back? Or will this cause the site to be reindexed again, resulting in an even lower ranking?
Technical SEO | | TienB240 -
How can I index several systems used for my website?
My site is built on PHP, but has a help.website.com page based on a helpdesk platform. I also have a wordpress blog. So, these are three "different systems" under the same domain. When I crawl my site, neither the blog nor the help page show up. How can I make them show up? Thanks!
Technical SEO | | rodelmo880 -
Are sidewide badge links can harm your website?
Hey all, I wanted to check if links that have built naturally over the past years, linking from a badge (image) sitewide, can harm the linked website? Here is some more information: 1. It's from a competition that the winners were able to add the badge with the link to their site (the link to our website was to a subpage, not homepage). 2. There are around 15 websites with the badge as a link. The website has around 200 root domain links. There will not be any more websites with the badge, just these 15. 3. The sitewide links percentage are 5% of the overall number of pages linked to our website. Based on the last penguin update (4th of October, 2013), can our website be harmed from the badge link building?
Technical SEO | | stevanl0 -
Can I canonical the same page?
I have a site where I have 500+ Page listing pages and I would like to rel=canonical them to the master page. Example: http://www.example.com//articles?p=18 OR http://www.example.com/articles?p=65 I plan on adding this to the section from of the page template so it goes to all pages - When I do this, I will also add the canonical to the page I am directing the canonical. Is this a bad thing? Or allowed?
Technical SEO | | JoshKimber0 -
Should I Use the Disavow Tool to for a Spammy Site/Landing Page?
Here's the situation... There's a site that is linking to about 6 articles of mine from about 225 pages of theirs (according to info in GWT). These pages are sales landing pages looking to sell their product. The pages are pretty much identical but have different urls. (I actually have a few sites doing this to me.) Here's where I think it's real bad -- when they are linking to me you don't see the link on the page, you have to view the page source and search for my site's url. I'm thinking having a hidden url, and it being my article that's hidden, has got to be bad. That on top of it being a sales page for a product I've seen traffic to my site dropping but I don't have a warning in GWT. These aren't links that I've placed or asked for in any way. I don't see how they could be good for me and I've already done what I could to email the site to remove the links (I didn't think it would work but thought I'd at least try). I totally understand that the site linking to me may not have any affect on my current traffic. So should I use the Disavow tool to make sure this site isn't counting against me?
Technical SEO | | GlenCraig0 -
Content Duplication and Canonical Tag settings
Hi all, I have a question regarding content duplication.My site has posted one fresh content in the article section and set canonical in the same page for avoiding content duplication._But another webmaster has taken my post and posted the same in his site with canonical as his site url. They have not given to original source as well._May I know how Google will consider these two pages. Which site will be affected with content duplication by Google and how can I solve this issue?If two sites put canonical tags in there own pages for the same content how the search engine will find the original site which posted fresh content. How can we avoid content duplication in this case?
Technical SEO | | zco_seo0 -
Why is an error page showing when searching our website using Google "site:" search function?
When I search our company website using the Google site search function "site:jwsuretybonds.com", a 400 Bad Request page is at the top of the listed pages. I had someone else at our company do the same site search and the 400 Bad Request did not appear. Is there a reason this is happening, and are there any ramifications to it?
Technical SEO | | TheDude0 -
Confused about rel="canonical"
I'm receiving a duplicate content error in my reports for www.example.com and www.example.com/index.htm. Should I put the rel="canonical" on the index page and point it to www.example.com? And if I have other important pages where rel="canonical" is being suggested do I place the rel="canonical" on that page? For example if www.example/product is an important page would I place on that page?
Technical SEO | | BrandonC-2698870