I’m very new to DigitalOcean — I’ve only used shared hosting up until this point. Yesterday I finally decided to move my WordPress site over to DO. I wanted to start a fresh install so I used the one-click WordPress setup to create my droplet. I migrated my content, media, users, themes, etc. Most everything is running well, except for multiple domain mapping.
To be clear, I’m not running a Multisite WordPress installation. Instead, I’ve created landing pages in my WordPress install and mapped domains to them, essentially creating single-page websites/landing pages. (I need these domains to have their own website but each really only needs to be a single page. I’d rather manage them in my single site than create multiple sites for a couple of pages.) I use this plugin to set up the mapping: https://wordpress.org/plugins/multiple-domain-mapping-on-single-site/
I have two landing pages — all in all three web addresses, one of which is a subdomain. Here’s an example of the setup:
When I was on shared hosting, all I had to do was point the primary domain, subdomain, and the landingpage domain to my web server; set up the domains in cPanel; direct them to the WordPress directory using cPanel’s domain manager; and route the domains to the landing pages using the mapping plugin.
Right now my primary domain works and my subdomain is working as well (it’s going to the correct landing page). However, my second domain landingpagedomain.com is not working at all. I get a “This site can’t be reached — domain unexpectedly closed the connection — ERR_CONNECTION_CLOSED” message when trying to navigate to it.
Here’s how everything’s set up. I use Google as my registrar:
Also worth mentioning: the subdomain landed on the primary domain’s home page until I added a .conf file to sites-available under apache2. That .conf file is essentially a copy of 000-default.conf, just with some values changed to match the subdomain. Once I did that, the mapping worked perfectly. I’ve also created a .conf file for the landing page domain but it hasn’t helped. (I’ve enabled both and I’ve restarted apache2 services many times as well).
Sorry for all the many details. I really don’t know what else to try at this point. Maybe my entire setup is wrong? I’m very new at this.
Also, if it helps, here are the actual domains:
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!