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
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
-
Change URL or use Canonicals and Redirects?
We just completed a conclusive a/b test on a client's landing page. The new page saw a 30% bump in conversions, yay! Now what? Option 1: Change the url of the new page to that of the old page, retire the old page. Option 2: Redirect the old page and anything that was pointing to it to the new page, make the new page the canonical. I'm afraid of option 1 because I think Google's WTF penalty will be a bit harsher than option 2, but I wanted to sanity check that here. Any thoughts or experienced advice would be very appreciated!
Technical SEO | | LindsayDayton0 -
Canonical Tags on Parameter Pages With Hreflang
Hey Everyone: We are currently implementing hreflang tags on our site, and we have many parameter pages with hreflang tags; however, I am afraid these may be counted as duplicate content without canonical tags. example.com/utm_source=tpi href='http://example.com/de" hreflang="de" rel="alternate" href='http://example.com/nl" hreflang="nl" rel="alternate" href='http://example.com/fr" hreflang="fr" rel="alternate" href='http://example.com/it" hreflang="it" rel="alternate" I have two questions 1. Do I need a canonical tag pointing to example.com ? 2. On the homepage without the parameter, should I add self referencing hreflang tags? (href="http://example.com/" hreflang="es" Thanks so much for your help! Kyle
Technical SEO | | TeespringMoz0 -
How to fix rel canonical tags?
Hello there, I am trying to fix the issues with my campaign and I am trying to fix Rel canonical issues. I tried to read a few blogs and other sources which talked about the Rel canonical but I am not able to understand why is Rel Canonical happening? I understand that http://elegancealways.com is not the same as http://elegancealways.com/about-us/ but then I cannot change the link as the link is correct. I read about 301 and 302 redirects. I do not understand that which link is correct then? The errors SEO MOZ is showing is what I am not able to understand as these links are correct. I need help here!! Thanks Vineeta qTc2a2H.png
Technical SEO | | vineeta0 -
What is the advantage of using sub domains instead of pages on the root domain?
Have a look at this example http://bannerad.designcrowd.com/ For each category of design, they have a landing page on the sub domain. Wouldn't it be better to have them as part of the same domain? What is the strategy behind using sub domains?
Technical SEO | | designquotes0 -
Rel="external"
Hi all, I got a link and its off a site and marked up with rel="external". Is this a followed or nofollowed link? Does it pass link juice? Thanks
Technical SEO | | Sharer0 -
Domain "Forwarded"?
Hi SEOMoz! The company I work for has a website, www.accupos.com, but they also have an old domain which is not used anymore called http://accuposretail.com/ These two sites had duplicate content so I requested the OLD site (http://accuposretail.com/) be redirected to accupos.com to eliminate the dupe content. Unfortunately, I do not understand completely what happened but when they performed this forwarding the accuposretail.com URL is still in use. Now it just displays EXACTLY what accupos.com displays and not something similar. The tech team told me it is forwarded but I can't help but see the URL still in the search box on top. Is this unacceptable? The actual URL has to forward and change to the accupos.com URL in order to not be duplicate content, correct? I have limited experience in this. Please let me know if we are good to go, or if I need to tell them more action is required. Thanks! Derek M
Technical SEO | | DerekM880 -
Magento Canonical Tags
Magento pages have been giving me a lot of trouble with the canonical tags. In some cases duplicate pages are showing up, so I need to add the canonical tag. In other cases I'm getting an error that there are multiple canonical tags per page. How can I get my pages canonized without duplicate tags? It seems like it's either too much or not enough, no matter what I do. Note: this only applies to category and product pages.
Technical SEO | | GravitateOnline0 -
Should rel canonical tags include the root domain
It does sound like a silly question but bear with me a little... I recently installed on my Joomla website a module that automatically creates rel canonical tags for pages that contain lists that can be sorted by different criteria: (price, alphabetic order, etc...) I know that a proper canonical tag should look like this: However, the module I'm using creates the following structure Will this work? I mean, will it be "understood" by the bots? To see what the module actually does, you can visit the following link http://www.quipeutlefaire.fr/fr/index.php?sort=price&sort_direction=desc&limit=10&limitstart=0&option=com_auctions&category=240 In the source code you will see that the canonical tag is Which is the original "unsorted" page. Thanks in advance for your help
Technical SEO | | QPLF0