Double domain name in category URL-s

You can “workaround” the issue with a redirect in .htaccess, although it’s not clear why this double-domain-URL would be accessible in the first place.

So, we can redirect URLs of the form example.com/example.com/?cat=6 to example.com/?cat=6, which you then say is correctly redirected to example.com/category by WordPress.

For example, at the top of your .htaccess file:

RewriteRule ^(?:www\.)?example\.com/(.*) /$1 [R=301,L]

This basically removes example.com (or www.example.com) from the start of the URL-path. Any query string that was present on the initial request (eg. cat=6) is passed through to the target URL by default.

Test first with a 302 (temporary) redirect to avoid potential caching issues.