sitemap problem

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

sitemap problem

Post by pmfuser » Mon Jul 18, 2016 10:08 am

Recently I saw Google dropping out my FAQ pages from its index. I just looked into the sitemap, and saw this:

http://www.mysite.com/faq/http://www.mysite.com/faq/ ... and then it continues with the url, whatever is the page.

Now I'm not sure if I should delete the full path from configuration, or if this is coming from somewhere else. I do have friendly URLs enabled.

It's interesting that the first page (FAQ home page) in the sitemap is correct, just http://www.mysite.com/faq/

Thanks

Thorsten
Posts: 14793
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: sitemap problem

Post by Thorsten » Mon Jul 18, 2016 8:06 pm

Hi,

you're right, I found the issue: https://github.com/thorsten/phpMyFAQ/co ... 5f70b805d7

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: sitemap problem

Post by pmfuser » Mon Jul 18, 2016 8:11 pm

Thanks.

Is this for 2.9.3 or for later?

Thorsten
Posts: 14793
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: sitemap problem

Post by Thorsten » Mon Jul 18, 2016 8:12 pm

Hi,

will be included in 2.9.3, planned for the end of this month.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: sitemap problem

Post by pmfuser » Mon Jul 25, 2016 1:30 pm

Additional question:

Google has started reporting duplicated content issues because it has already picked "doubled" URLs. I'm trying to fix it by implementing 301 redirects, but having a hard time.
It looks like something from the existing FAQ configuration (.htaccess I guess) is preventing it. For example:

http://www.example.com/faq/some-faq.html is a correct URL.

http://www.example.com/faq/http://www.e ... e-faq.html is the one that was published in the sitemap, and which Google has picked.

The wrong one returns content while it should be 404. Why is that, please? My guess is that it's something from .htaccess but I cannot figure it out.

If I try to do this with any other part of the website, I get 404 - as it should be.

Thanks

P.S.
Let me add, I just tested it further by entering an additional string to an existing URL, and the FAQ has returned the page instead of 404. There's something fundamentally wrong in the URL rewrites here.

Thorsten
Posts: 14793
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: sitemap problem

Post by Thorsten » Mon Jul 25, 2016 1:38 pm

Hi,

what's returned for the wrong URLs?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: sitemap problem

Post by pmfuser » Mon Jul 25, 2016 7:12 pm

Well, I just realized that the canonical tag is wrong as well, so the URL system is simply broken. The canonical itself does the same what was in the sitemap, it puts the FAQ root URL twice. That's really wrong. I did disable the sitemap manually, and put my own I created manually, but now when all pages are returning different canonical URLs, not sure what are my options.

Thanks

Thorsten
Posts: 14793
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: sitemap problem

Post by Thorsten » Mon Jul 25, 2016 7:17 pm

Hi,

if I check this demo at http://denholm.demo.phpmyfaq.de/ I don't see wrong canonical URLs.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: sitemap problem

Post by pmfuser » Mon Jul 25, 2016 7:19 pm

Yeah, but that one does not have friendly URLs turned on.

Thorsten
Posts: 14793
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: sitemap problem

Post by Thorsten » Mon Jul 25, 2016 7:20 pm

Hi,

I have on my local machine:

Code: Select all

<link rel="canonical" href="http://macbookpro.local/phpMyFAQ-2.9/phpmyfaq/addcontent.html">
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: sitemap problem

Post by pmfuser » Mon Jul 25, 2016 7:55 pm

Well, however the {currentPageUrl} is created, here it comes back with the double root of FAQ.

But please note, this all started by sitemap listing those URLs. If I visit the FAQ normally, URLs are fine. But if I enter additional string, the canonical changes. That's why I stated that there was something fundamentally wrong with how the rewrite works.

Here is live example I picked from Who uses phpMyFAQ:

This is a correct URL: https://www.intogres.com/faqs/content/4 ... panel.html
Here is altered URL (I added "stringxyz" into URL): https://www.intogres.com/faqs/stringxyz ... panel.html

Check the source code and see what is for canonical tag for each. That is wrong.

In short, if the URL for whatever reason gets "spelled" wrongly, and gets picked up by search engines or people link to the page by using that "wrong" URL, the site is in trouble until it fixes the URL in question (by 301 redirect) as the "wrong" URL will be requested forever.

Thanks

Thorsten
Posts: 14793
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: sitemap problem

Post by Thorsten » Mon Jul 25, 2016 8:00 pm

Hi,

ah, you're talking about a 2.8 installation. I fixed that in 2.9 only. 2.8 only gets security fixes.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: sitemap problem

Post by pmfuser » Mon Jul 25, 2016 8:06 pm

I have 2.9.

Thorsten
Posts: 14793
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: sitemap problem

Post by Thorsten » Mon Jul 25, 2016 8:08 pm

Hi,

will try to reproduce it.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

pmfuser
Posts: 106
Joined: Tue Apr 01, 2014 7:00 am

Re: sitemap problem

Post by pmfuser » Mon Jul 25, 2016 8:24 pm

Here is an example running 2.9.2:

http://video-insight.com/kb/stringxyz/c ... nager.html

The original URL is without "stringxyz"

Thanks

Post Reply