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
-
Http:// vs Https:// in Og:URL
Hi, Recently, we have migrated our website from http:// to https://. Now, every URL is in https:// and we have used 301 permanent redirection for redirecting OLD URL's to New Ones. We have planned to include http:// link in og:url instead of https:// due to some social share issues we are facing. My concern is, if Google finds the self http:// URL on every page of my blog, will Google gets confused with http and https:// as we are providing the old URL to Google for crawling. Please advice. Thanks
Technical SEO | | SameerBhatia0 -
Keyword use in city specific "homepages"
My company, RightFit Personal Training, is a marketplace for people to find independent personal trainers based on preference. I am currently in the process of expanding nationally, and each city essentially has it's own homepage. Currently, the url of each city page ends in the name of the city only. For example, the url for the Houston page is www.rightfitpersonaltraining.com/houston/. The issue here is that I actually wanted my contracted developer to add the state abbreviation as well as the words "personal trainers" to the end of each city page url. So what I really wanted to see out of the Houston personal training page was www.rightfitpersonaltraining.com/houston/tx/personal/trainers. Do you think it is worth it for me have my developer go back and change the URL structure of the city homepages to reflect the latter? This should also benefit the structure of the personal trainer profiles, because they could all fall under their specific city homepages. For example, I think it would be to my benefit if each trainer profile url ended in /city/state/personal/trainer/trainername. Thoughts?
Technical SEO | | mkornbl20 -
Canonical URL Tag: Confusing Use Case
We have a webpage that changes content each evening at mid-night -- let's call this page URL /foo. This allows a user to bookmark URL /foo and obtain new content each day. In our case, the content on URL /foo for a given day is the same content that exists on another URL on our website. Let's say the content for November 5th is URL /nov05, November 6th is /nov06 and so on. This means on November 5th, there are two pages on the website that have almost identical content -- namely /foo and /nov05. This is likely a duplication of content violation in the view of some search engines. Is the Canonical URL Tag designed to be used in this situation? The page /nov05 is the permanent page containing the content for the day on the website. This means page /nov05 should have a Canonical Tag that points to itself and /foo should have a Canonical Tag that points to /nov05. Correct? Now here is my problem. The page at URL /foo is the fourth highest page authority on our 2,000+ page website. URL /foo is a key part of the marketing strategy for the website. It has the second largest number of External Links second only to our home page. I must tell you that I'm concerned about using a Cononical URL Tag that points away from the URL /foo to a permanent page on the website like /nov05. I can think of a lot of things negative things that could happen to the rankings of the page by making a change like this and I am not sure what we would gain. Right now /foo has a Canonical URL Tag that points to itself. Does anyone believe we should change this? If so, to what and why? Thanks for helping me think this through! Greg
Technical SEO | | GregSims0 -
"Fourth-level" subdomains. Any negative impact compared with regular "third-level" subdomains?
Hey moz New client has a site that uses: subdomains ("third-level" stuff like location.business.com) and; "fourth-level" subdomains (location.parent.business.com) Are these fourth-level addresses at risk of being treated differently than the other subdomains? Screaming Frog, for example, doesn't return these fourth-level addresses when doing a crawl for business.com except in the External tab. But maybe I'm just configuring the crawls incorrectly. These addresses rank, but I'm worried that we're losing some link juice along the way. Any thoughts would be appreciated!
Technical SEO | | jamesm5i0 -
Canonical Tag - Magento - Help
Hello, I was hoping to get some help or tips on how to best control the canonical tag on a Magento based website. When you go into the Magento admin and enable the option to use the canonical tag on pages, all that does is input the canonical tag to the exact page just with the http:// in the url. My goal is to use the canonical tag on specific pages and point it to other pages, not just the same page with an http:// For example, right now for page: example.com/question/baseball the canonical tag is pointing to http://example.com/question/baseball What i want is to be able to do is take: example.com/question/baseball and have the canonical tag point to example.com/question/baseballbats Is this possible? Does what I'm saying make sense? Please let me know what you all think.... Thanks!
Technical SEO | | Prime850 -
Whitespace INSIDE # tag harmful?
Hi, I understand that 'whitespace' in source code is absolutely fine and is stripped out. For example the following code is fine: Red Apples some text However, how is whitespace interpreted INSIDE html tags such as H1's? My Dev team have instructions to add H1's to a page, however they have done so like this: Red Apples (37 characters long) rather than this: Red Apples (10 characters long) Do you think this extra space will be harmful? The browser renders it fine, however if you use something like the mozbar plugin is shows the H1 length as 37 characters. I know the 10 character H1 is 100% relevant to the search term "Red Apples", however is the 37 character H1 only 27% relevant? (10/37) I've made the request to the Dev team to remove this whitespace because I'd rather err on the side of caution, but its been knocked back because the HTML spec specifies consecutive white-space should be interpreted as a single space and all browsers build the DOM by trimming a tags value - and they imagine search bots do the same so don't want to mess with the compiler. Anyone have experience of this? I've never had whitespace in a H1 before so don't know. Happy to leave the whitespace in if it's not going to be an issue. Thanks in advance
Technical SEO | | FashionLux0 -
Google is keeping very old title tags in the SERPs for my site. How can I fix this?
Hi Around 6 months ago a site I work with changed its brand. One company became two. Despite changing the title when a new site went live around 6 months ago Google still picks up the old title for certain search results relevant to the old title. When a search result is relevant to the new title it shows that. It's very frustrating as we are trying to re-brand and do not want the old brand name showing for some very important search results. Thanks in advance for your help Paul
Technical SEO | | pauldoffman0 -
Should we use "and" or "&"?
Our client has an ampersand in their brand name. The logo has "&", their url is spelled out. I'm trying to get them to standardize the use of the name for directories/listings. Should we use "and" or "&"?
Technical SEO | | vernonmack0