• Setup:
    I have a multi site network installed and working well with three sites on the same installation – site1.com, site2.org and site3.com.
    For site2.com if either site2.com or https://www.site2.com are placed in browser address bar the browser goes to site2.com as is desired.
    Problem:
    I want another domain name to also got to site2.com. I want a visitor to be able to type secondname4site2.com into their browser and get to site2.com as if they just typed in site2.com.
    I own the domain name and it points to my server but instead of going to site2.com I am getting error messages and/or 404 pages.
    My original .htaccess file is:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    I have been trying different rules in .htaccess such as:

    
    # Change site to site2
     <If "%{HTTP_HOST} != 'www.secondname4site2.com'">
         Redirect "https://site2.com/"
     </If>

    No luck so far

    • This topic was modified 5 years, 11 months ago by Steve-CC.
    • This topic was modified 5 years, 11 months ago by Steve-CC.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Geoffrey Shilling

    (@geoffreyshilling)

    Volunteer Moderator

    I actually just started working with multisite myself, so I don’t have a lot of experience. But I did run into this issue when I first set up my install. My problem was that I had created the second domain, but hadn’t pointed it to the right place.

    Do you have your second domain pointing to the same directory as your multisite installation? Have you seen the Codex article on domain mapping?

    If you want a second domain name pointing at a site you can go back to your domain name provider and forward that domain into the site by pointing the one domain at the other. Of course, your domain name provider must offer this service but most of them do.

    Additionally, if the domain provider can do so, you might do a domain masking with that second domain hiding the first.

    I can’t think of any way to point two domains into one WordPress site on a multisite via mapping outside of some changes to the WordPress core or a custom plugin possibly.

    Your other option would be to share content between the two discrete sites in a multi-site. That is actually fairly easy and provides a way to diverge the two sites later if their purposes should change.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need help with multisite domain names’ is closed to new replies.