rivkamak
asked on
Wordpress category pages in crawl growing
When I look at my site url in wordpress I see that when I have a category page, no matter what the middle of the url is, wordpress still loads the correct category archive based off the last folder on the url
IE:
mysite.com/category/hobbie s
will return the same posts as
mysite.com/category/gibber ish/hobbie s
Even thought gibberish is not a valid category on my site.
A. Is there anything to do to stop that and it should return a 404 when the middle category doesn't exist
B. Somehow the google crawler, it picking up on this problem and my site is generating duplicate categories in the link so my crawl directly is just growing exponentially. How can I stop that?
The list is showing
mysite.com/category/hobbie s
mysite.com/category/hobbie s/hobbies
mysite.com/category/hobbie s/hobbies/ hobbies
etc.
IE:
mysite.com/category/hobbie
will return the same posts as
mysite.com/category/gibber
Even thought gibberish is not a valid category on my site.
A. Is there anything to do to stop that and it should return a 404 when the middle category doesn't exist
B. Somehow the google crawler, it picking up on this problem and my site is generating duplicate categories in the link so my crawl directly is just growing exponentially. How can I stop that?
The list is showing
mysite.com/category/hobbie
mysite.com/category/hobbie
mysite.com/category/hobbie
etc.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Likely good test will be to do this.
Clone your site to a dev site for destructive testing, so if you destroy your site, no problem.
Then on your dev site.
1) Ensure all text/html part caching is 100% disabled, by looking at returned headers...
Use curl -I -L https://DavidFavor.com/ output as an example of draconian cache busing headers to set.
2) After #1 is correct, manually flush your browser cache, to ensure you're starting from a point where your changes will actually render in your browser.
Note: If you skip #1 + #2 any change you make which fixes your problem may never show up in your browser.
3) Deactivate all your plugins + retest.
4) Switch to GeneratePress for your theme + retest.
5) If problem persists, then there's database corruption to fix... which is... a long ugly conversation... This is highly unlikely.
6) Either #3 or #4 will likely fix the problem, so you'll start reactivating theme or plugin(s), one by one, till problem reoccurs.
You'll know your problem is fixed when a URL like mysite.com/category/hobbie s/hobbies/ hobbies throws a 404, rather than returning content.
Clone your site to a dev site for destructive testing, so if you destroy your site, no problem.
Then on your dev site.
1) Ensure all text/html part caching is 100% disabled, by looking at returned headers...
Use curl -I -L https://DavidFavor.com/ output as an example of draconian cache busing headers to set.
2) After #1 is correct, manually flush your browser cache, to ensure you're starting from a point where your changes will actually render in your browser.
Note: If you skip #1 + #2 any change you make which fixes your problem may never show up in your browser.
3) Deactivate all your plugins + retest.
4) Switch to GeneratePress for your theme + retest.
5) If problem persists, then there's database corruption to fix... which is... a long ugly conversation... This is highly unlikely.
6) Either #3 or #4 will likely fix the problem, so you'll start reactivating theme or plugin(s), one by one, till problem reoccurs.
You'll know your problem is fixed when a URL like mysite.com/category/hobbie
ASKER
There is nothing set up for category base in the optional settings.
All I have as plugins is genesis. It's a pretty basic site with nothing added.
Thank you