Subdomain/Domain mapped site redirecting to main site
-
Hello everybody!
I’ve been working on getting my first real WordPress Network set up on my own (owned) “Dynamic-DNS-Enabled” server. I’ve gotten ALMOST everything working after a few days. I’ve got one snag holding me back from considering the site ready for production… The domain mapped site keeps redirecting back to my main site (which has a 301 redirect for itself to ssl) if using the bare url.
For instance:
example.com <– default_server
elpmaxe.moc <– domain mapped siteIf I enter example.com I get redirected to https://example.com – fine.
https://example.com – fine.
https://elpmaxe.moc – fine!
elpmaxe.moc –> https://example.com – not ok.Here’s the details:
Ubuntu Server 16.04
Wordpress 4.6.1
nginx 1.10.0Plugins:
Divi Builder
Mailgun
Nginx Helper
W3 Total Cache
WordPress MU Domain MappingI installed WordPress using easyengine’s Subdomain/Domain Mapping/fastcgi install scripts. Guides here and here.
Pastebin of nginx config for you below. If you need more info I am more than happy to provide/troubleshoot/find out.
/etc/nginx/sites-available/example.com – literal
https://pastebin.com/rdRhpVV0I am using namecheap.com as my registrar/DNS provider.
Advanced DNS settings for both sites:
_______________________________________________________________________
example.com
Type________________Host________________Value________________TTL
A+DynDNS Record_____@___________________MY_IP_ADDRESS________Auto
CNAME_______________*___________________example.com._________30 min
CNAME_______________(sub.for.mailgun)___(mailgun.org)________Auto
CNAME_______________elpmaxe_____________example.com._________Auto
CNAME_______________www_________________example.com__________30 min
TXT_________________(sub.for.mailgun)___(mailgun.org)________Auto
TXT_________________(mx.for.mailgun)____(mailgun.org)________Auto_______________________________________________________________________
elpmaxe.moc
Type________________Host________________Value________________TTL
A+DynDNS Record_____@___________________MY_IP_ADDRESS________Auto
CNAME_______________elpmaxe_____________example.com._________Auto
CNAME_______________www_________________elpmaxe.moc__________Auto_______________________________________________________________________
For Domain Mapping:
Network Admin: example.com –> Dashboard > Settings > Domain Mapping
Server IP Address: BLANK
Server CNAME domain: example.com
Domain Options Checked: Remote Login, Permanent redirect, User domain mapping page, Redirect administration pages to site’s original domain.For Domains:
Network Admin: example.com –> Dashboard > Settings > Domains
Site ID________________Domain________________Primary_____| Edit Option | Delete Option |
5______________________elpmaxe.moc___________Yes ________| Edit Option | Delete Option |NOTE: Site ID is definitely correct. Mousing over elpmaxe.moc while under Dashboard > Sites shows: https://example.com/wp-admin/network/site0info.php?id=5
_______________________________________________________________________
For Sites:
URL________________Mapping
example.com
elpmaxe.moc________elpmaxe.mocNOTE: I had originally created elpmaxe.moc as elpmaxe.examlpe.com (only option to create a new site, right?) and then changed the Site Address (URL) by editing elpmaxe.moc. I changed that site address AFTER setting up the domain mapping.
_______________________________________________________________________
That is everything I can think of to provide. I have flushed my local DNS config, tested in different browsers (Chrome, Opera, and (OH NO) Internet Explorer), tested on different networks (my own, via cell connection on my phone, remoted into work and tested from their network), and the results are consistent.
If I’ve missed anything just let me know and I’ll figure out how to get it to you. ??
THANK YOU to anyone that cares to help. I apologize if the formatting of this post gets funky. I’ll try to edit it into something pretty after it’s posted.
- The topic ‘Subdomain/Domain mapped site redirecting to main site’ is closed to new replies.