Forum Moderators: phranque
I have set up a development/staging server, and use DNS to point domains to each.
www.example.com 1.1.1.1
dev.example.com 2.2.2.2
On the dev server I'm using ISPConfig, which uses vhosts for all my sites. I believe this requires the server to have the domain name requested along with the ip (rather than just the IP).
Anyway, some domains the clients own and I don't have the ability to create an A record like 2.2.2.2 dev.example.com. Not a problem for me and the developers, because we just create a hosts file entry. But it's a pain to do that to all the clients, and could potentially cause problems later. Does anyone have an easy solution for this? can I create a bogus domain and 301 redirect it somehow so it looks like the request is for dev.example.com but points to the correct server?
Thanks
If you have access to any DNS server, you do have the ability to do this. Anyone anywhere can point any domain to any server's IP address. So if you have the client's permission, you can define a "dev" subdomain for their domain in your DNS zone file, and point it to the public IP address of your server.
Although this zone file should be seen as 'non-authoritative' for that domain, as long as it does not conflict with an entry in the client's own DNS zone file, it should work just fine.
This entry should be removed from your DNS zone file as soon as the project is concluded, of course.
Jim