Is this correct?
-
I noticed Moz using the following for its homepage
Is this best practice though? The reason I ask is that, I use and I've been reading this page by Google
http://googlewebmastercentral.blogspot.co.uk/2013/04/5-common-mistakes-with-relcanonical.html
5 common mistakes with rel=canonical
Mistake 2: Absolute URLs mistakenly written as relative URLs
The tag, like many HTML tags, accepts both relative and absolute URLs. Relative URLs include a path “relative” to the current page. For example, “images/cupcake.png” means “from the current directory go to the “images” subdirectory, then to cupcake.png.” Absolute URLs specify the full path—including the scheme like http://.
Specifying (a relative URL since there’s no “http://”) implies that the desired canonical URL is http://example.com/example.com/cupcake.html even though that is almost certainly not what was intended. In these cases, our algorithms may ignore the specified rel=canonical. Ultimately this means that whatever you had hoped to accomplish with this rel=canonical will not come to fruition.
-
Thanks
-
Ow im sorry, totally mis understood - sorry if i was explaining something you understood.
Moz use
you said they use
/> i presume now you mean the / at the end of the tag.
This is an old school closing tag. HTML elements were traditionally opened and closed in HTML versions before HTML5. Normally this is done obviously with tags such the opener "
" and closer "
". However some elements dont have a seperate closing tag such as "" tags. In older html versions these were closed using the format
Missing these tags didn't used to do much as most browsers rendered the page correctly anyways, but best practice was to include the / to close elements. However with the dawn of HTML5 things changed.
HTML5 doesn't require the closing tag. Elements that used to require one now simply dont. Browsers still understand both versions absolutely fine and its kinda ok to use either. But the most modern and correct practice is to use it without.
Edit:
Racking my brain, i believe the / was added as best practice to assure compatibility with XHTML which was pegged to be the next version of HTML. When XHTML was scrapped in favour of HTML5 it changed. Somebody may correct me on this one though
-
Thanks, I realise the usage should be a correct relative URL or a correctly formed absolute URL. In Moz's case, they used a correctly formed absolute URL.
My question is more around...why not use "/"?
Cyto
-
Looks fine to me, i think you misunderstand Mistake 2
They are using an absolute URL
If they did the "mistake 2" their canonical tag would look like
You canonical tags should always be absolute for good practice
is correct
or any variant of this would be wrong
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
-
How do I know if I am correctly solving an uppercase url issue that may be affecting Googlebot?
We have a large e-commerce site (10k+ SKUs). https://www.flagandbanner.com. As I have begun analyzing how to improve it I have discovered that we have thousands of urls that have uppercase characters. For instance: https://www.flagandbanner.com/Products/patriotic-paper-lanterns-string-lights.asp. This is inconsistently applied throughout the site. I directed our website vendor to fix the issue and they placed 301 redirects via a rule to the web.config file. Any url that contains an uppercase character now displays as a lowercase. However, as I use screaming frog to monitor our site, I see all these 301 redirects--thousands of them. The XML sitemap still shows the the uppercase versions. We have had indexing issues as well. So I'm wondering what is the most effective way to make sure that I'm not placing an extra burden on Googlebot when they index our site? Should I have just not cared about the uppercase issue and let it alone?
Intermediate & Advanced SEO | | webrocket0 -
Correct keywords Anchor text for links passing
Hi i have some old pages with more link equity, i m planning to key some bestseller in the main content.. my question is on best use of anchor text, can i use the below for eg: Product name is Chloride Exide Safepower Cs 7-12 12V Sealed Battery so i want to use the key word which is "12v 7ah Battery" in anchor text or buy 12v 7ah battery in Anchor text, will this google consider as spam?? Pls suggest
Intermediate & Advanced SEO | | Rahim1190 -
Incorrect cached page indexing in Google while correct page indexes intermittently
Hi, we are a South African insurance company. We have a page http://www.miway.co.za/midrivestyle which has a 301 redirect to http://www.miway.co.za/car-insurance. Problem is that the former page is ranking in the index rather than the latter. The latter page does index occasionally in the same position, but rarely. This is primarily for search phrases like "car insurance" and "car insurance quotes". The ranking was knocked down the index with Penquin 2.0. It was not ranking at all but we have managed to recover to 12/13. This abnormally has only been occurring since the recovery. The correct page does index for other search terms like "insurance for car". Your help would be appreciated, thanks!
Intermediate & Advanced SEO | | miway0 -
Site Explorer, Social Media Count. Am I linking my social media correctly?
How do I correctly link my social media pages? I have link going from my Twitter, Facebook and Google + to my website. But a quick Open site explorer check says that I have, 0 Facebook Friends, 0 Twitter followers and 0 Google + Followers. Where as in relaity, I have 100 - 1000 follwers on each. Infact, the hyperlink from my Twitter Profile section doesn't appear as a no follow link atall on an OSE check of my website. Am I linking social media wrong?
Intermediate & Advanced SEO | | Paul_Tovey0 -
Is my schema implemented correctly and not spammy?
i already used the validation tool from Google. It tell's me it's implemented, but i would like to know specifically if everything is implemented correctly and in a non spam way. Here is a product link to test: http://www.suddora.com/pink-sweatbands-wholesale-pink-wristbands.html
Intermediate & Advanced SEO | | Hyrule1 -
How to structure your site correctly for optimal juice flow?
Hello fellow mozzers. I have a question regarding structuring a site for optimal link juice flow. If you have an existing website that has for instance a contact page, we know its pointless for that page to have any juice at all. In a hypothetical scenario would it be ok to no index, no follow that page? What happens to existing pagerank on such a page? for instance if you have a contact page with pr 4 and you no index, no follow it, I understand the pagerank will disappear from that page but will it be distributed to other pages on your site? What would be the correct way of handling this scenario?
Intermediate & Advanced SEO | | rightmove0 -
Google Not Indexing Description or correct title (very technical)
Hey guys, I am managing the site: http://www.theattractionforums.com/ If you search the keyword "PUA Forums", it will be in the top 10 results, however the title of the forum will be "PUA Forums" rather than using the code in the title tag, and no description will display at all (despite there being one in the code). Any page other than the home-page that ranks shows the correct title and description. We're completely baffled! Here are some interesting bits and pieces: It shows up fine on Bing If I go into GWT and Fetch as Google Bot, it shows up as "Unreachable" when I try to pull the home-page. We previously found that it was pulling 'index.htm' before 'index.php' - and this was pulling a blank page. I've fixed this in the .htaccess however to make it redirect, however this hasn't solved the problem. I've disallowed it from pulling the description .etc from the Open Directory with the use of meta tags - didn't change anything. It's vBulletin and is running vBSEO Any suggestions at all guys? I'll be forever in anyones debt who can solve this, it's proving to be near impossible to fix. Here is the .htaccess file, it may be a part of the issue: RewriteEngine On DirectoryIndex index.php index.html Redirect /index.html http://www.theattractionforums.com/index.php RewriteCond %{HTTP_HOST} !^www.theattractionforums.com
Intermediate & Advanced SEO | | trx
RewriteRule (.*) http://www.theattractionforums.com/$1 [L,R=301] RewriteRule ^((urllist|sitemap_).*.(xml|txt)(.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L] RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap/)
RewriteRule ^((archive/)?(..php(/.)?)?)$ vbseo.php [L,QSA] RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php [L,QSA]
RewriteRule ^forum/(.*)$ http://www.theattractionforums.com/$1 [R=301,L]0