I have a domain of a provider and a vps of dogitalocean.How i connect my domain to my vps?

August 28, 2015 2.1k views
DNS DigitalOcean PHP CentOS

Hi i have my own domain that I buy ( have add the domain in the DNS section. In my vps i have installes cPanel & WHM.
I add my hostname into the setup of WHM.
I've created a cPanel account for me.I create some sub domains and I put the domain redirection to my vps ip.When I type for example it say this error:
I've create this sub domain also in the domain controller of my provider but anyway don't work.
This is my zone file :
$TTL 1800 IN SOA 1440779151 10800 3600 604800 1800 1800 IN NS 1800 IN NS 1800 IN NS 1800 IN A 1800 IN CNAME 1800 IN CNAME 1800 IN CNAME 1800 IN CNAME
I think that is not a problem of the zone file but a problem of cPanel or a problem of my provider.
Anyway when i type my Ip : (dev is the folde that contain the index.php) it says this error:

Not Found
The requested URL /dev was not found on this server.
Apache/2.4.16 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at Port 80
Is it a problem of Apache?I have read the file .htaccess but i think is Ok.

My .htaccess of

RewriteEngine on
RewriteCond %{HTTPHOST} ^$ [OR]
RewriteCond %{HTTP
HOST} ^$
RewriteRule ^/?$ "http:\/\/\/dev" [R=301,L]

What i can do?

4 Answers


It looks like you haven't changed your nameservers for this domain to point to DigitalOcean's nameservers:

$ whois
Name servers:

So, you should log in to the registrar where you registered this domain and change the domain's nameservers there to:

I have change the NAME server.But now When i type the url (from my iPad with Safari) Safari Say: Safari can'T open this page because it doesn't found the server


In my case I have installed vesta panel on VPS instead of CPanel.

Well I created Child Name servers for my domain name. it points to my server ip it points to my server ip

I updated these name servers on my other domains and installed website on my vps and it worked fine.

I hope this helps

Have another answer? Share your knowledge.