MyBB Community Forums

Full Version: Google SEO 1.8.4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Hello. I couldnt fixed this issue:

Add to .htaccess:

# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /
Can general page tags also be added through this plugin?
# Google SEO Sitemap:
RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]

https://clubdark.net/mybb/misc.php?googl...ads&page=1 <- this work

However when you do

https://clubdark.net/mybb/sitemap-threads.xml?page=1 <- this does not it says sitemap page invalid
(2021-01-24, 04:00 AM)clubdarknet Wrote: [ -> ]# Google SEO Sitemap:
RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]

https://clubdark.net/mybb/misc.php?googl...ads&page=1 <- this work

However when you do

https://clubdark.net/mybb/sitemap-threads.xml?page=1 <- this does not it says sitemap page invalid

everything works fine here, just make sure your htaccess

# Some hosts need a RewriteBase specification.
RewriteBase /MyBB/

# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteRule ^([^&]*)&(.*)$ http://yoursite/MyBB/$1?$2 [L,QSA,R=301]

read htaccess.example.txt
(2021-01-24, 04:00 AM)clubdarknet Wrote: [ -> ]# Google SEO Sitemap:
RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]

https://clubdark.net/mybb/misc.php?googl...ads&page=1 <- this work

However when you do

https://clubdark.net/mybb/sitemap-threads.xml?page=1 <- this does not it says sitemap page invalid

For some unfathomable reason the page=1 parameters seems to be removed, this can happen due to bad rewrite rule (QSA missing or not respected), bad webserver, or some other intermediate like cloudflare. There's not much I can do about it, if the parameter isn't passed along just because someone/something thinks "page=1" is optional when (in this case) it's mandatory...

If you can't find a solution, just use the misc.php URL (set sitemap url scheme accordingly in the settings).
Hey Frost just need some advice. I'm using the plugin's sitemap just want to know if I applied it correctly in Google Search Console.

I submitted https://sharree.com/sitemap-index.xml
https://gyazo.com/a1ee916dd91b71183f551dd70197e491

Google Search Console tells me its only discovered 20 urls and when I click for more detail it tells me its only read the forums.xml doc. So I'm guessing the 20 urls read are probably the forums.
https://gyazo.com/ec3333a0cdb1cafffbb8e6fcbb04f535

Is something wrong here?
Your sitemap looks good to me, not sure why Google only sees 20 URLs of it... try resubmitting it?

Did you change forum permissions for search engines? The sitemap will only show contents depending on forum permissions.

To determine how Google sees your sitemap, you could use URL Inspection -> Live Testing -> View Tested Page for your sitemap URL. But it won't work since it's robots noindex by default, you'd have to temporarily remove the robots noindex directive from inc/plugins/google_seo/sitemap.php

//     @header('X-Robots-Tag: noindex');
Hey Frost thanks for your response. Got a second question for you. I'm trying to use the Google SEO Tweaks setting (use specific forum as your index page). I set the ID to 2. Now when I load my forum it still loads the core index.php file as my index and when clicking on Forum 2, that forum instead of loading the forumdisplay, it redirects to the core index.php.

Shouldn't it be making forumdisplay=2 the index page? Could there be something wrong in the code? I've tested this on my main site and on a fresh MyBB site

https://gyazo.com/5343209f0685954e006be55c40d4987a



Actually solved it. I'm unsure if this was actually the solution but it worked and if someone is trying to use their forumdisplay as index here's how.

1. Set the forum ID in the Google SEO Tweaks setting
2. Add this line of code to your .htaccess
#Alternate default index page
DirectoryIndex forumdisplay.php?fid=2
(Replace 2 with your forum ID)
Hi, it seems Google SEO ignores the following piece of code:
https://github.com/mybb/mybb/blob/41fc42...#L682-L727

Ultimately breaking the multipage with some sort or filter options. I know this setting promises to attempt rather than to guarantee, but I hope it gets eventually fixed.
Fix what…? It's not my fault MyBB uses weird ?vs& logic instead of a helper function that appends query string properly.

Wordpress example: https://developer.wordpress.org/referenc...query_arg/

This is overengineered, it's really just a strpos looking for '?' instead of going by $mybb->seo_support which is wrong half the time no matter what you set seo_support to.

Google SEO works around the issue already, so the broken URLs do work (with additional redirect for both ?->& and &->? case), not much else I can do.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18