1

I have a problem with canonical redirect.

mydomain.com/mycat is the correct category URL but the following URL works too: - mydomain.com/asdfa/mycat - mydomain.com/1234/mycat - mydomain.com/anythingyouwant/mycat

And all these URLs show the category mycat... The canonical is mydomain.com/mycat and now Google give results with bad URLs.

Can you please help me because I didn't understand why.

I have the same template on other website and when we try to go to mydomain.com/asdfa/mycat, WP redirect to the canonical URL mydomain.com/mycat

0

Check error logs - probably PHP sent some content to browser before WordPress tried redirection (and failed because headers was already sent).

Check if you don't have any ?> on the end of config, theme and plugins files, and ofc check if deactivating plugins and temporary changing theme to one of Twentys help, it could help you target problematic part.

0

Maybe this answer about canonical urls can help you. It won't tell you how to do the redirects, but it will solve the Google search engine problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.