Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Duplicate, Google choosing different canonical

         

abdulrahmankz

2:11 pm on Sep 14, 2024 (gmt 0)

Top Contributors Of The Month



https://example.com vs https://www.example.com
I tried to force redirect all www to non-www urls from htaccess file (server side) but not solving the issue
Google keeps chose different canonical than user instead of the rendered page is rel="canonical" is the same as url which is self-canonical
I don't know if there is some points missing
thanks in advanced


[edited by: not2easy at 2:26 pm (utc) on Sep 14, 2024]
[edit reason] for readability please use example.com [/edit]

not2easy

2:33 pm on Sep 14, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Canonical redirects are discussed in the Apache Web Server [webmasterworld.com] forum - unless the site is on WP, then it should be posted under the WordPress [webmasterworld.com] forum.

It helps to describe exactly (using example.com) what redirects you have done so that you can get useful help.

not2easy

2:48 pm on Sep 14, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If this is the same WP site you had posted about previously here: [webmasterworld.com...] and you did not alter the settings in Settings > General Settings > WP URL and Site URL I would start there. It is possible the redirects will not work if the site settings are different that you intend, even if the code in .htaccess is OK.

abdulrahmankz

3:59 pm on Sep 14, 2024 (gmt 0)

Top Contributors Of The Month



its not wordpress, its custom code website

not2easy

4:05 pm on Sep 14, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



OK, so post your topic in the Apache Web Server forum linked above and explain the situation that you have in place. There are various reasons it may not work, but we can't guess what they are without understanding the situation.

not2easy

5:18 pm on Sep 14, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



This discussion is now in the Apache Web Server forum: [webmasterworld.com...]