• Resolved nilskamm

    (@nilskamm)


    Hey everyone!

    I have a problem i can not figure out.
    I installed a multisite and use the same subdomains of different toplevel domains for the different sites.
    Example:
    1: https://wordpress.domain.com
    2: https://wordpress.test.com

    Now we finished our first site and put it online yesterday.
    While doing so we changed the domain of the site 2 from https://wordpress.test.com to the domain named in the extra “Link to the page you need help with:”-field, but with www. at the beginning. I did that in the Network Admin -> Sites ->Edit Site by changing Info -> Site Address (URL), which automatically changend Settings -> siteurl and home.

    Everything seemed to work, but today i tested the site with my mobile and didn′t use www.
    My mobile was redirected to the 1 site https://wordpress.domain.com.

    I tested it with my pc as well.
    Everytime i use www. it shows the right site. When i don′t use www. it redirects to the wrong site in our multisite network.

    For now i changed the Site Address to no www. and it works, but i would like to understand where this problem comes from and maybe even activating www. again.

    I tried deleting wordpress and local caches.

    Does anyone has an idea what i can do or try?

    Thanks a lot!


    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • It could be a hosting issue? With my old host I used to have to set up ‘example.com’ and ‘www.example.com’ separately. With my current host I set up ‘example.com’, and the www version is set up automatically.

    • This reply was modified 4 months, 1 week ago by helennatasha.
    • This reply was modified 4 months, 1 week ago by helennatasha.
    Thread Starter nilskamm

    (@nilskamm)

    Thank you for your answer!

    I thought so, too. But there is only one entry with our current hoster. We changed it from a normal wordpress site to the multisite. With www. it showed the multisite where i entered the address with www. When using without www. it sent you to the main multisite. So the DNS change worked with www. and without https://www.. Just the multisite directed to the wrong multisite inside the network.

    Can i configure multiple adresses for one multisite?

    Can you remove ‘www’ from the multisite so that the multisite and the main site match?

    Thread Starter nilskamm

    (@nilskamm)

    That′s not the goal.

    Before we started we had 4 sites in 4 seperated wordpress instances.
    Now the goal ist to get all of them into the multisite installation.
    We wanted to start with the “main” one and because of that i made the multisite installation for the main domain. Then we changed our plans and started with another site, which is finished now. So we changed the toplevel domain to the multisite and put the toplevel domain into the Site Address field of the right multisite. The main multisite is a different site yet to be finished and released later with another toplevel domain.

    Thread Starter nilskamm

    (@nilskamm)

    I push this topic, because i would really like to solve it or at least understand it.

    Are there more information needed, i maybe can provide?

    Thanks a lot already!

    • This reply was modified 4 months ago by nilskamm.
    billz88

    (@billz88)

    It seems you’re facing a redirection issue between www and non-www versions of your multisite domains.

    1. Ensure it’s configured correctly for multisite.
    2. Update “Site Address (URL)” and “Home” fields in Network Admin without www.
    3. Clear server-side caches and browser cache.
    4. Use browser tools to identify where the redirection issue originates.
    5. Review server settings for any www-related redirects.
    6. Confirm DNS records for both www and non-www versions.
    7. Check wp-config.php for DOMAIN_CURRENT_SITE setting.

    By addressing these areas, you should resolve the redirection problem between www and non-www URLs on your multisite setup.

    Thread Starter nilskamm

    (@nilskamm)

    Thank you for your answer @billz88 !

    After a lot more searching for an answer and finding a lot of outdated information i found something that worked for me. Don′t know why i thought, that it will work without it. I guess because i don′t remember adding it to non multisite installations.

    To solve it for me i changed “Site Address (URL)” to using www.
    Then i added these two lines to my .htaccess just below “RewriteEngine On”:
    RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
    RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]

    After that i could not login to wp-admin anymore. The error message said “Cookies are Blocked or Not Supported by Your Browser”. Deleting browser and server cache or deactivating plugins didn′t change anything for me. I got it working again by adding this line to my wp-config.php right before “/* That’s all, stop editing! Happy publishing. */”:
    define(‘COOKIE_DOMAIN’, $_SERVER[‘HTTP_HOST’] );

    Thanks a lot everyone!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.