Welcome to WebmasterWorld Guest from 54.226.146.15

Forum Moderators: incrediBILL

Message Too Old, No Replies

rel="canonical" tag

Question about proper use

     

Liane

11:15 am on Dec 22, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I cannot get htaccess and do not have a 301 redirect for my site, I was advised to use a rel="canonical" tag on each page of my site. I am using HTML 4.01.

To answer two questions before someone asks:

Yes, when I can afford it, the site will be updated probably to html 5.
I will also be changing hosts in the very near future.

So ... after having added the rel link, I read in a few threads and discovered that most people use a trailing forward slash in the url which I have not done. So my tags are all:

<link rel="canonical" href="www.mysite.com/product_large_blue_widgets.html" >

Do I need to go back and add the forward slash and should it simply be .html/" ?

JD_Toims

11:21 am on Dec 22, 2013 (gmt 0)

WebmasterWorld Senior Member Top Contributors Of The Month



Do I need to go back and add the forward slash and should it simply be .html/" ?

No, not at all -- You just use the "main" URL for your content in the href part, so what you have is fine, with one exception: You need the protocol [http://] at the beginning, so it's an absolute URL.

<link rel="canonical" href="http://www.example.com/product_large_blue_widgets.html" >

Liane

11:39 am on Dec 22, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, the http is there already. So I am good to go! Yeah.

Many thanks for the input! :)

lucy24

11:55 am on Dec 22, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



trailing forward slash in the url

Are you positive you're not thinking of xhtml grammar, where every element has to be closed? Then it would be
<link rel="canonical" href="http://www.example.com/product_large_blue_widgets.html" />

but in html there's no slash.

HTML 4 is fine. You can start adding HTML 5 pieces as you go along; you don't have to change in one fell swoop. But if anyone says you should have been using XHTML for the past ten years, just put your fingers in your ears and hum loudly. Works for me :)

And yes, if you don't have full control of your own htaccess file it is time to change hosts.

Liane

12:26 pm on Dec 22, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Lucy,

I am not positive about anything right now. My site has taken a huge nose dive in the rankings and it was also hacked for a second time ... despite doing everything the host told me to do security wise.

One of the very kind members here is helping me, but he is very busy, so am struggling along as best I can and reading as much as I can in between receiving his advice. It's a slow process.

I have made a lot of changes to the site and am updating as I go along. Crossing my fingers that all this works! :)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month