Support » Networking WordPress » WordPress multisite non www gets redirected to main site

Viewing 4 replies - 1 through 4 (of 4 total)
  • Option 1) set non-www requests for secondsite.com to forward to www via DNS Zone file, or htaccess

    Option 2) use a domain mapping plugin that allows for multiple domains per site- making the www primary.

    Moderator Bet Hannon

    (@bethannon1)

    Support Team Volunteer Coordinator

    Just FYI: since WP version 4.5, domain mapping is a native feature in multisite, so you don’t need a plugin to do this.

    Hi, I’m not using plugin over here. Same problem persists if sub site non-www domain has path in it then it gets redirected to main site domain. I think its a bug if not, then I need to know proper redirect rules.

    
    RewriteCond %{HTTP_HOST} !^domain_to_exclude_from_www_redirect.com [NC]
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
    

    so if path is https://my_second_domain.com/this_is_my_landing_page, i get redirected to https://domain_to_exclude_from_www_redirect.com, instead of https://www.my_second_domain.com/this_is_my_landing_page

    For what it’s worth, I’m experiencing the same issue with one of my multisite secondary domains. The issue of non-www redirecting to the network registration page only occurs in the Chrome browser on our end. I do not experience the issue in Firefox, Safari, or elsewhere.

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