Forum Moderators: martinibuster

Message Too Old, No Replies

canonical tag issue

         

sunnydeval

5:33 am on Jan 18, 2018 (gmt 0)

5+ Year Member



I am taking an example.

Website : http://www.example.com/

On above website, canonical tag is <link rel="canonical" href="http://www.example.com"/> (here slash at the end of url is not included)

and i am using URL (http://www.example.com/) with slash for link building.

I am confused about whether to use slash at the end of url in link building or not as i have not included slash in canonical tag (http://www.example.com).

Is there any difference between "http://www.example.com/" and "http://www.example.com"

Your help will be appriciated!

Thanks

keyplyr

5:52 am on Jan 18, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello sunnydeval and welcome to WebmasterWorld [webmasterworld.com]

Just leave the slash off. Be consistent.

phranque

6:57 am on Jan 18, 2018 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



for the home directory, the slash is mostly irrelevant because it is the same url as far as the search engines are concerned.

technically speaking, the trailing slash is the correct url for the home page of your site.
when you request http://www.example.com browsers will essentially add the trailing slash by requesting the path "/" from hostname http://www.example.com

when you are canonicalizing http://www.example.com/more-path-info/ vs http://www.example.com/more-path-info or http://www.example.com/more/path/info/ vs http://www.example.com/more/path/info the trailing slash should be used (or not) consistently depending on if the url is actually referring to a (virtual or physical) directory or not.
out of the box, apache will typically be configured (using mod_dir) to redirect to the trailing slash url if a directory name exists matching a requested no-trailing-slash path.

sunnydeval

4:30 am on Jan 22, 2018 (gmt 0)

5+ Year Member



Thank you for your reply.

phranque

6:58 am on Jan 22, 2018 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], sunnydeval!