News:

Wondering if this will always be free?  See why free is better.

Main Menu

PHPSESSID

Started by milcar, October 07, 2013, 11:49:53 PM

Previous topic - Next topic

milcar

How to disable PHPSESSID in URLs and canonical tags? Reason: looks like there will be a problem with search engines?

PHPSESSID shows only during the first couple of clicks for guests. After that, it disappears.

I've already found here several threads about this, but I'm not sure if they are valid for smf 2.0.5.


Arantor

You need to remove code from SMF directly to do so. It should only show through the first click. It is primarily there to ensure your stats are accurate in terms of the number of guests you have.

You can always tell Google to ignore it via Google Webmaster Tools (but Google generally knows to ignore PHPSESSID anyway)

milcar

Thank you for really quick answer and you are right, I checked it again, only the first page that I open has PHPSESSID parameter (in all links).

Which part of SMF code should I remove?

Kindred

Why would you want to do remove it?
Quote from: Arantor on October 08, 2013, 12:02:00 AM
It is primarily there to ensure your stats are accurate in terms of the number of guests you have.

You can always tell Google to ignore it via Google Webmaster Tools (but Google generally knows to ignore PHPSESSID anyway)

Also, the canonical tags are important to have present for Search Engines -- they prevent you from being "dinged" for multiple content.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

milcar

Kindred,

I can only guess how search engines work, but there are official recommendations (google: hxxp:support.google.com/webmasters/answer/76329 [nonactive] and hxxp:support.google.com/webmasters/answer/35769 [nonactive] ; bing/yahoo: hxxp:bing.com/webmaster/help/webmaster-guidelines-30fba23a [nonactive]) to avoid session id in URLs.

Anyway, in my opinion smf canonical tags with PHPSESSID included can even cause the problem instead of solving it. I don't understand why is the session id part of canonical URLs, isn't the purpose of canonical tags to present one "main" URL for all URLs with same content? I can tell Google to ignore this param in URLs as Arantor said, but at the same time my site is using another "canonicalization" method (support.google.com/webmasters/answer/139066) contradictory indicating to Google that PHPSESSID is indeed important, because it is a part of canonical URL (URL in rel=canonical tag).

When Google visits my site for the first time, and sees [mysite]/forum/index.php link on home page, but finds out that the content has <link rel="canonical" href="[mysite]/forum/index.php?PHPSESSID=88mb6phfofrd7sbfbhk1palae0" />, which one of these two URLs will be indexed?



Arantor

Because there's a bug in how the PHPSESSID is readded to the page.

I will look at patching that in the next version of SMF.

milcar

Hey Arantor, what bag exactly?

Canonical tags should be without session id?

Arantor

Correct, they should be without session id because it does neutralise the benefit of having said canonical URL.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

I saw it was fixed in a mod but honestly we should fix this in 2.0; I patched it properly in 2.1 today.

milcar

Should I try this mod with 2.0.5, it says compatible with 2.0.4?

IMO this thing with canonical URLs is a serious problem, Google can index URLs with session id and what will happen when Google or somebody else visits that URL with old session id after a couple of days. Also, it is almost certain that Google will find out that there are intentional duplicates - many pages with completely same content but with different URLs, and even worse these different URLs are very explicitly defined in canonical tags. There have been many cases when sites kicked themselves out of the index completely because of misuse of canonical tags.


Arantor

And if you use GWT to notify Google of PHPSESSID it will cease to be a problem for you anyway...

milcar

Quote from: Arantor on October 08, 2013, 06:08:26 PM
And if you use GWT to notify Google of PHPSESSID it will cease to be a problem for you anyway...

Are you sure that Google will ignore PHPSESSID not just in links but in canonical tags, too? It still looks like giving contradictory information to search engines, like for example having www prefix in canonical tags and yet doing 301 from www to non-www version.

Arantor

If you tell them to via GWT, then yes!

milcar

Quote from: Kindred on October 08, 2013, 05:31:17 PM
http://custom.simplemachines.org/mods/index.php?mod=3315

I've just downloaded and installed this mod (v0.6), and everything seems to work well with smf 2.0.5.

Quote from: Arantor on October 08, 2013, 06:08:26 PM
And if you use GWT to notify Google of PHPSESSID it will cease to be a problem for you anyway...

And I'll do this, too.

Thank you both for help!

Advertisement: