Answer to How to Install WP MultiSite with Top Level Domains

Home Forums Official Forum- Navsingh Answer to How to Install WP MultiSite with Top Level Domains

This topic contains 2 replies, has 2 voices, and was last updated by  Alfred 2 years, 6 months ago.

  • Author
    Posts
  • #1799 Reply

    Nav Singh
    Keymaster

    In this turorial we´ll install WordPress Multisite and give each site in the network it´s own separate top level domain.
    Changing the DNS settings

    First we need to point all the domains we want to use in this network to our WordPress Multisite install. This usually involves two steps:

    Specify the IP address of your server for each domain
    Let your server know it should pass on incoming requests for your domains to your WordPress Multisite install.

    • This topic was modified 2 years, 6 months ago by  Nav Singh.
  • #1800 Reply

    Nav Singh
    Keymaster

    In practice this usually means changing the A-records of your domains and point them to your server.

    Pick one domain as your primary domain and add it to the server. For the other ones you can create virtual hosts under this primary domain.

    In Direct Admin you would first add a new domain and then go to Admin level > Custom HTTPD Configurations and select your primary domain. You can now add the virtual hosts:

    ServerAlias secondarydomain.com www. secondarydomain.com

    Install WordPress Multisite

    Install WordPress and follow the instructions on how to enable WordPress Multisite.

    When asked if you want to use subdomains or subdirectories choose subdomains.

    If you installed your primary domain using the www-prefix, a warning will appear when you enable Multisite: We recommend you change your siteurl to example.com before enabling the network feature. Personally I always ignore this warning and have never experienced any problems.
    Map your domains

    When WordPress Multisite is up and running you can start adding new sites. By default they will use a subdomain like subdomain.example.com. To change this to a top level domain, choose Edit site as Network Admin and specify the domain name you want to use on the info tab.

    Also add one more line to your wp-config.php file: define(‘COOKIE_DOMAIN’, ”);
    To www or not www

    If you´re prepending your domains with the www subdomain, you´ll want to redirect the non-www versions of your domain to the www versions. On a single install WordPress takes care of this, but in a Multisite environment I´ve always had to do this manually.

    For each domain you´re using, add the below redirect in your .htaccess file (changing example.com to your domain):

    RewriteCond %{HTTP_HOST} ^example.com
    RewriteRule (.*) http: //www.example.com/$1 [R=301,L]

    You should now have a Multisite install with seperate domain names.

    • This reply was modified 2 years, 6 months ago by  Nav Singh.
  • #1803 Reply

    Alfred

    thanks nav

Reply To: Answer to How to Install WP MultiSite with Top Level Domains
Your information:




Official Forum

This is the Official Forum of Navsingh a community that helps you find answers to all of your problems,they can be Java/programming,wordpress,android, android programming, seo related or technology related