move domain from one server to another?

202 Views Asked by At

I have a website on a shared hosting and I'm trying to move it to an unmanaged VPS the thing that I have set up my server and tried this tutorial to make my domain name point at my server but I had no luck.

because when ever I try to do this : ping www.mydomain.com

I still get the old host ip instead of mu new one.

I have waited more than 48 hours.

Do I have to delete some files on my old host ? or there is something i'm missing ?

thanks

2

There are 2 best solutions below

0
On BEST ANSWER

There should be no need to delete anything at your old host.

You are getting old host IP address in ping result which tells that your domain is still resolving to old host instead of your own VPS.

Checkout the outputs of following things to confirm that DNS records are correct:

[1] Check DNS records of your domain from online DNS verification tool like intodns.com.

[2] Verify whether the new DNS records are propagated across the globe or not. You can check it from here - whatsmydns.net.

[3] Check the ping result without "www" i.e. ping yourdomain.com

1
On

Create a file at location /etc/bind/

Name it db.your_domain Add the following in this file:

$TTL 86400

;SPF records

your_domain.    IN  TXT  "v=spf1 a -all"

@       IN  SOA ns.your_domain. admin(or any email id).your_domain. (
              5     ; Serial
         604800     ; Refresh
          86400     ; Retry
        2419200     ; Expire
         604800 )   ; Negative Cache TTL

 your_domain.       IN  NS  ns.your_domain.

; MX records
your_domain.    IN  MX  5   mail.your_domain.

;A records
your_domain.    IN      A       ipv4 address
your_domain.    IN      AAAA       ipv6 address
ns               IN      A       ipv4 address
ns       IN  AAAA    ipv6 address
mail         IN      A       ipv4 address
mail         IN  AAAA    ipv6 address


;CNAME

 www             IN      CNAME      your_domain.