I am going to change my hosting, and allready rented a new server.
Now I want to configure my DNS via the new hosting/server but my domain is still registrered at the 'old' hoster, how should I do this correctly?
I have tried it via the following two ways, both not working:
Setting up DNS at 'old' host, with my new ip-address at my DNS-records in stead of the old IP. I get Apache is functioning normally... while everything is configured correctly (tested etc, all ok)
Changing nameserver at old host to new one, ns1.newhost.com etc, and then configuring the DNS via DirectAdmin on my new VPS... I've done this about 10hrs ago, only now my domain cannot be resolved. If i lookup the NS info via www.mxtoolbox.com the new nameservers are shown for the domain, but my DNS config is not working...
Am I missing some settings or DNS records?
Step one: make sure you have a record pointing to your new server. Generally, one would use an A record to achieve this. Then, configure apache to listen for your domainname. You can do this by using the ServerName directive. There's no rule saying the DNS server should be on the same server as the webserver.
Related
I need to setup a CNAME record locally. The use case is that I have a domain which is being hit in production and I want to change the production DNS settings but I want to verify my setup works by testing the setting locally before I change it in production.
Currently my domain is setup like this:
A mydomain.com some.ip.addre.ss
I want to change it to
CNAME mydomain.com somecnameaddress.com
I am able to test A record changes by modifying my hosts file but I cannot do this to test CNAME records. How would I go about doing this?
/etc/host cannot point cname
i use dns server (open source)
Technitium https://technitium.com/dns/
u create zone and point to cname
If you are testing APIs etc the Telerik Fiddler application has a HOSTS function which accommodates local CNAME changes as well as A records to override the windows hosts file.
Override Windows HOSTS file
You can do this by adding a entry in your local /etc/hosts file instead of updating the CNAME. Just add Your live domain and IP address of you test environment, it should work.
I have a GoDaddy domain www.exmaple.com which points to 255.255.255.255 (fake IP of course). My web server is behind a router that forwards port 80 to the appropriate port. All fine and dandy. However, like 99% of people out there, I have a dynamic IP. So I set up a hostname with noip.com called helloworld.ddns.net, set up their update client on my server (so it can update them whenever the IP changes (hasn't happened yet but i'm hoping it works as advertised), and then went to godaddy.com to change my records. Which is where stuff gets as hairy as harambe.
I started off by removing my A record, and changing my CNAME to point to helloworld.ddns.net.
Didn't work.
Googled around, and found that I need/should use the noip NSs. So I went back to godaddy, and changed my nameservers from theirs to the noip ones... ns[1,2,3,4,5].no-ip.com.
Still doesn't work. Should also point out, that after I made this change I lost the ability to set any records on my domain name. Which I guess makes sense since there's no point in godaddy having a record if I'm not using their NSs.
Tl;dr: How do I point godaddy domain, www.example.com, to a noip hostname, helloworld.ddns.net, which in turn points to my dynamic home ip, x.x.x.x.
Finally managed to solve my own issue, and I feel very silly for not realizing what the issue was before. The problem was that the CNAME was pointing to a subdomain (www) and therefore one couldn't access the site without including this in the URL. Summarised solution:
GoDaddy now has CNAME with a specific host name (ex www) and the noip domain as the value
No A record
Kept the default GoDaddy NSs
Configured forwarding w/o masking, to www.example.com... therefore, when someone tries to access example.com, they are automatically forwarded to the www subdomain.
A little bit of patience for propagation and everything was up and running.
I'am unable to make my website work after a server changing. Whether I access http://IP/~user/ or www.mydomain.com it just doesn't work. I am going mad.
Using the IP I get a Server not Found error (ERR_NAME_NOT_RESOLVED in Chrome); using the domain I get this:
What I did:
WHM
Hostname: localhost.mydomain.com
Primary resolver: 103.254.153.22 (<--LeaseWeb Singapore DNS Server)
Secondary resolver: 127.0.0.1
Nameserver and Resolved IP:
ns1.mydomain.com 216.21.224.199 (<--Register.com IP)
ns2.mydomain.com 216.21.224.199 (<--Register.com IP)
I created a user called user123.
Register.com
I already had a domain in a previous IP.
So I only changed the A records to my new IP.
I let these nameservers:
dns193.a.register.com. ['216.21.231.193']
dns193.b.register.com. ['216.21.232.193']
dns226.c.register.com. ['216.21.235.226']
dns249.d.register.com. ['216.21.236.249']
Server:
I sent all my PHP code to /home/user123/public_html.
I installed all the packages and extensions needed.
If there is any important information missing, let me know. I am a newbie in this matter, so please be patient.
The error using the domain was different because my Register.com hadn't done the transition to the new IP yet.
To access my server meanwhile, instead of using the IP I used http://Hostname/~user/ (in my case http://localhost.mydomain.com/~user123/) and it worked.
PS: In fact there were other problems, like Apache using a incorrect DirectoryRoot, but that's another story...
Just trying to create an web application, clients can create their own instance of the app, so I created a wildcard subdomain in CPanel, checked VirtualHosts and the A record in the DNS, all fine.
Now when I go to "client1app.domain.tld" it works, takes me to the clients app, but when that client creates a cname "app.clientdomain.tld" to "client1app.domain.tld", I get redirected to cPanels "Default Web Site Page".
I double-checked everything.
App DNS:
*.domain.tld. 3600 IN A x.x.x.x
Customer DNS
app.clientdomain.tld. 3600 IN CNAME client1app.domain.tld
App VirtualHost:
ServerName _wildcard_.domain.tld
ServerAlias *.domain.tld
Any help is greatly appreciated.
Note: I do have root, this is a VPS.
Simple things first, have you added *.domain.tld as a subdomain in cPanel using the user interface and not the command line?
I have tried to replicate this problem using one of my WHM servers and could not.
I recommend first updating cPanel/WHM to the latest version as some support articles covering wildcard subdomains point to some old versions of cPanel have bugs with wildcard subs which are now fixed.
I would also rebuild the httpd.conf if you have at any point manually edited it. Also make sure that the subdomain is not the same as the hostname as this causes some internal binding errors.
I set my environment up using only the cPanel sudomain button and not using the DNS editors in WHM or cPanel
I'm looking to figure out how to replicate the functionality of GoDaddy's PreviewDNS when I'm moving a site to my own web host based in cpanel.
My setup is this: I have a wordpress multiuser site setup with a subdomain install, and a wildcard redirect.
I can't figure out how I can preview the website for an account before the DNS is switched over to my host from the old host.
I've been able to sorta do this by creating an A record of a subdomain over to my host, but I still have the issue of not being able to test the actual files instead of a copy in a subdomain.
I have two IP addresses attached to the server, one to the server itself and all the shared domains, and the other dedicated to the WP multisite.
When I go to http://ipaddress/~username/, I either get an error, or get redirected to the wordpress multisite's default "this site doesn't exist, sign up now to create it" page. I've tried this with both IP addresses with no avail.
Any ideas?
I think what you're trying to do is ensure that everything is working on the new server before having the DNS globally changed for all users? You could change your local computers hosts file to point the domain (and any subdomains you wish to test) over to the new dedicated IP address, which is essentially moving the DNS over for just yourself.
Here's a pretty good guide on how to do it: http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/