Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the link rel="index" thing do?

Like this:

<link rel='index' title='mysite' href='http://mysite.com/' />

It appears inside all pages of the website.

I hope it doesn't tell google not to index that page :|

Also there's a

<link rel='canonical' title='mysite' href='http://mysite.com/' />

What is that for?

like image 961
Jennn Avatar asked Aug 06 '11 21:08

Jennn


2 Answers

<link rel='index' title='mysite' href='http://mysite.com/' />

It states that the linked document provides an index for the current document … which probably isn't true.

<link rel='canonical' title='mysite' href='http://mysite.com/' />

It states that http://mysite.com/ is the same page as the current document, and that the proper URL to use is http://mysite.com/.

like image 70
Quentin Avatar answered Sep 22 '22 03:09

Quentin


From the HTML4 specification:

Index
Refers to a document providing an index for the current document.

So this would be your main page. (This is the same reason we call it "index.html".)

And the Google Webmasters blog says that "canonical" provides the preferred URL for a page.

like image 25
jtbandes Avatar answered Sep 19 '22 03:09

jtbandes