ElkArte Community

Project Support => Support => Topic started by: elk_is_cool on July 23, 2016, 07:24:20 pm

Title: Unusual URL appended to my domain
Post by: elk_is_cool on July 23, 2016, 07:24:20 pm
Im getting this at the end of my domain URL :
my domain.com/index.php?PHPSESSID=d3a5fe194be2fb377b2b7be82961c093;wwwRedirect

I was hoping for just :  my domain. com

Is it something I'm doing wrong or setup on my host wrong?  I do have SEO friendly URL's ticked.   When clicking on a forum inside the main forum. the URL's show up correctly, this only happens on the main page.

My other 2 Elk forum URL's display correctly and there on the same host.  So it must be something I've done on this one forum.
Title: Re: Unusual URL appended to my domain
Post by: live627 on July 24, 2016, 12:39:57 am
Thats the PHP session being injected for guests.
Title: Re: Unusual URL appended to my domain
Post by: Jason on July 24, 2016, 12:56:16 am
I too had the same problem and i blocked phpsessid in robots.txt to display only normal url
Title: Re: Unusual URL appended to my domain
Post by: elk_is_cool on July 24, 2016, 09:08:14 pm
Oh, OK.  I wonder why my other 2 Elk forums don't do that, and, what would I need to add to the robots.txt?  Thanks ...
Title: Re: Unusual URL appended to my domain
Post by: emanuele on July 25, 2016, 02:14:17 am
Which one is the youngest forum?
Title: Re: Unusual URL appended to my domain
Post by: Jason on July 25, 2016, 12:24:08 pm
@elk_is_cool This was the code suggested to me

User-agent:
Disallow: *PHPSESSID
Title: Re: Unusual URL appended to my domain
Post by: elk_is_cool on July 27, 2016, 05:29:37 pm
Interesting you ask.   That would be the one that is doing this.   (coffeeforum. xyz)

@Jason ...thank you.  Will wait and see what Emanuele says, then will try that.
Title: Re: Unusual URL appended to my domain
Post by: emanuele on July 27, 2016, 05:50:44 pm
ElkArte already gives google all the info it needs to avoid this (i.e. a canonical URL). Google, though, takes a bit to digest that, usually in few... weeks? Months? I'm not sure, but sooner rather than later will start considering what the script tells it to do and will discard the URLs with the session ID.

Honestly, setting up a robot.txt will not really help indexing IMO, because the session is sent out anyway, and google will just stop reading the pages, making the whole process slower. But of course that's just my guess, not the opinion of a SEO guru.
Title: Re: Unusual URL appended to my domain
Post by: elk_is_cool on July 27, 2016, 07:30:09 pm
Interesting!  I did not know that.  I'll just leave it alone then and wait on Googles spiders to quit eyeing my session ID's.
They did stop on my other two forums, so I'll wait it out.
Thanks Emanuele
Title: Re: Unusual URL appended to my domain
Post by: Jason on July 28, 2016, 02:33:16 pm
@emanuele I will remove the restriction in robots.txt and i found this made my site to get indexed slowly :( (the one i suggested)
Title: Re: Unusual URL appended to my domain
Post by: elk_is_cool on July 29, 2016, 09:22:31 pm
Just for grins and giggles, I went to scrubtheweb.com meta tag analizyer and tested my forum and got this:

Meta Tag Analyzer - Results

Now analyzing:    http://...........

Warning: The URL you entered sent a redirect "Location: HEADER" response. Below are the redirect "Location: HEADER" responses sent by your web server:

Location:
http://www.........
/index.php?PHPSESSID=824d69a8f5c1d89052a451c5051b0de8;wwwRedirect

Redirection may and often does cause problems with search engines and is the reason for our warning.

The error report below is based on the information found at the final location:

Error: The robots.txt file for this site was not delivered by your web server as "plain text" as required by the robots exclusion standard. Some search engines may get confused and may not be able to index this website. We suggest you correct this as soon as possible.

I don't even see a robots.txt in my Elk folder on the host.   As "plain text?"  Wonder what that's about.  Should I make robot.txt? Apparently, their spider didn't like the redirection in my URL.
Title: Re: Unusual URL appended to my domain
Post by: ahrasis on July 29, 2016, 11:01:53 pm
I test elkarte.sch.my there but I am not given that any header's or robot's warning as yours. Only title, meta description and keywords advice given as it claims google and yahoo take those as important.
Title: Re: Unusual URL appended to my domain
Post by: elk_is_cool on July 30, 2016, 07:44:20 am
Well, I put a snippet of my URL (the last part where is said REDIRECT) in Google and it took me to a "repair tool" at the SMF forums.  I took a chance that it would work on Elk and it did!  SMF said to upload "repair_settings.php" and then go to it.  I simply followed the instructions and it worked for the REDIRECT problem.  Now it looks like PHPSESSID is gone too.    Yes!

DONT USE THIS SMF REPAIR TOOL, NOW I CANT POST...  LOG SHOWS 33 ERRORS, 2 CRITICAL

Title: Re: Unusual URL appended to my domain
Post by: emanuele on July 30, 2016, 09:24:11 am
The redirect is because of the "www VS non-www" thingy.
Basically if you point to your domainname.tld version, but you have configured in Elk www.domainname.tld, then Elk will redirect you to the "www" version. If you want to avoid that configure it with the domain without www. <= that sentence is a bit awkward. lol
Title: Re: Unusual URL appended to my domain
Post by: elk_is_cool on July 30, 2016, 10:22:23 am
Your correct Emanuele, I actually remember that setting option when I was first installing the forum, I chose to use www. my domain. com   If I'd known it would cause all this, I would have avoided the www.
Title: Re: Unusual URL appended to my domain
Post by: emanuele on July 30, 2016, 10:29:15 am
I personally prefer the www... but I'm old-fashioned. :P
Title: Re: Unusual URL appended to my domain
Post by: ahrasis on July 31, 2016, 07:38:32 am
Any reason why you are still using www?
Title: Re: Unusual URL appended to my domain
Post by: emanuele on July 31, 2016, 09:04:49 am
Title: Re: Unusual URL appended to my domain
Post by: radu81 on July 31, 2016, 02:55:11 pm
I don't know why but I also use www on all websites.
It doesn't matter if you use www or not, don't use both, you will get duplicated content
Title: Re: Unusual URL appended to my domain
Post by: Jason on July 31, 2016, 03:00:35 pm
Quote from: radu81 – I don't know why but I also use www on all websites.
It doesn't matter if you use www or not, don't use both, you will get duplicated content
Duplicated content, if i re-direct www users to non-www too?
Title: Re: Unusual URL appended to my domain
Post by: radu81 on July 31, 2016, 03:26:53 pm
Nope, you don't get duplicated content if you use a redirect. You get duplicated content if you can access your site through www and also without www