Mapping www.blog.name to your multi-site WordPress blog at example.com/blogname and ensuring the URL displays as www.blog.name while users view it involves a combination of domain mapping and WordPress Multisite configuration. Here’s how you can achieve this:
Prerequisites
- WordPress Multisite Setup: Have the Mutisite configured correctly. either as subdomains or subdirectories—subdirectories in this case.
- Domain Ownership: You need to own the domain
blog.nameand have access to its DNS settings. - Hosting Access: You’ll need access to your hosting control panel (e.g., DirectAdmin, cPanel, Plesk) and WordPress admin dashboard.
Steps to Map www.blog.name to example.com/blogname
1. Configure DNS Settings for blog.name
- Go to your domain registrar (e.g., GoDaddy, Namecheap) where
blog.nameis registered. - Update the DNS settings to point
www.blog.nameto your WordPress Multisite server: - A Record: Set
www.blog.nameto the IP address of your hosting server (e.g., the same IP asexample.com). - CNAME Record (alternative): Point
www.blog.nametoexample.comif you prefer a CNAME setup. - Allow some time (usually a few hours, up to 48 hours) for DNS propagation.
2. Add the Domain to Your Hosting
- Log in to your hosting control panel.
- Add
www.blog.nameas an addon domain or parked domain (depending on your host’s terminology): - Addon Domain: If your host supports it, point
www.blog.nameto the same root directory asexample.com(where WordPress is installed). - Parked Domain: Alias it to
example.comso it resolves to the same server. - Ensure the domain is recognized by your server alongside
example.com.
3. Map the Domain in WordPress Multisite
- Log in to your WordPress Multisite admin dashboard as a Network Admin.
- Navigate to Sites > Add New (or edit the existing site for
example.com/blogname). - If your Multisite uses a plugin like WordPress MU Domain Mapping (older method) or a modern alternative like WP Multisite Domain Mapping:
- Install and activate the plugin across your network.
- Go to the domain mapping settings (usually under Settings > Domain Mapping or similar).
- Add
www.blog.nameas the custom domain for the site currently atexample.com/blogname. - Set it as the primary domain so it displays
www.blog.namein the browser instead ofexample.com/blogname. - If you’re not using a plugin (native Multisite since WordPress 4.5+):
- Edit the site under Network Admin > Sites.
- Update the Site Address (URL) to
www.blog.name. - WordPress will handle the mapping natively if the domain is properly pointed to your server.
4. Update WordPress Configuration (if needed)
- Open your
wp-config.phpfile in the root directory of your WordPress installation. - Ensure the Multisite domain settings allow custom domains by adding or verifying this line:
define('DOMAIN_CURRENT_SITE', 'example.com');
- You don’t need to change this to
blog.name, as it defines the main network domain. The mapping handles the rest.
5. Test and Troubleshoot
- Clear any caching (browser, server, or CDN like Cloudflare) to ensure the changes take effect.
- Visit
www.blog.nameand verify it loads the content fromexample.com/blogname. - Check that the URL remains
www.blog.namein the address bar (this confirms the mapping works). - If you encounter issues:
- Double-check DNS settings.
- Ensure your
.htaccessfile is correctly configured for Multisite (especially if using subdirectories):apache RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]
6. SSL Certificate (Optional but Recommended)
- To secure
www.blog.name, install an SSL certificate: - Use a free service like Let’s Encrypt via your hosting panel.
- Update the site URL in WordPress to
https://www.blog.name. - Test with
https://www.blog.nameto ensure it works.
Outcome
Once completed, visitors typing www.blog.name will see the content from example.com/blogname, and the browser will display www.blog.name as the URL. This setup leverages WordPress Multisite’s ability to map custom domains to individual sites within the network.
If you run into specific issues (e.g., hosting limitations, plugin conflicts), let me know your setup details (hosting provider, Multisite type), comment below and I’ll refine the advice!