Help with Simple DNS Configuration

September 9, 2014 6.2k views

Howdy!

I have my WordPress site all set up, but I'm having issues with DNS for embark-church.org. My droplet's IP address is 104.131.52.152

Chrome says that the DNS lookup failed, and I've checked on many computers in different locations.

I just can't figure out what I'm doing wrong. Any help would be appreciated.

2 comments
  • Looks like you don't have a wildcard setup for the your domain, you have two choices (based on the limited information above).

    Add an explicit A entry into your DNS with the value of "www" pointing to your IP, e.g.

    www 104.131.52.152
    

    Or, you can have all URLs resolve to your domain, not just www

    @ 104.131.52.152
    

    =======

    If you ping your URL, it works

    11:12 ~ $ ping embark-church.org
    PING embark-church.org (104.131.52.152): 56 data bytes
    64 bytes from 104.131.52.152: icmp_seq=0 ttl=48 time=49.370 ms
    

    But, when you visit the URL, it redirects to www.embark-church.org, which does not appear to be setup, and it cannot be pinged.

    11:12 ~ $ ping www.embark-church.org
    ping: cannot resolve www.embark-church.org: Unknown host
    
  • UNbelievable. Thanks a ton! =D

1 Answer

Hi !

I went to check your blog, and I can see your website only by surfing by its ip address.

So in your case, you can experience trouble with either DNS propagation, or Apache configuration for your virtualhost.

If you want to check for a DNS resolution, you can use the 'dig' command tool, the DNS swiss army knife. Let see if embark-church.org is pointing well to your IP address ( 104.131.52.152 ) :

dig +short embark-church.org
104.131.52.152

Sounds to be OK on that side. So, going with a browser to your website should work unless your virtualhost configuration is wrong. Let's check what is going on here :

curl -I http://embark-church.org
HTTP/1.1 301 Moved Permanently
Date: Tue, 09 Sep 2014 14:44:06 GMT
Server: Apache
X-Powered-By: PHP/5.5.9-1ubuntu4
Set-Cookie: wfvt_4129035792=540f12368f8b8; expires=Tue, 09-Sep-2014 15:14:06 GMT; Max-Age=1800; path=/; httponly
X-Pingback: http://www.embark-church.org/xmlrpc.php
Location: http://www.embark-church.org/
Content-Type: text/html; charset=UTF-8

It looks like your Apache configuration is doing a HTTP 301 (permanent) redirection to www.embark-church.org. But, is your subdomain pointing well to your droplet IP ? You can check it again with dig :

dig +short www.embark-church.org
--> empty response means no record !!!!

Your trouble may come from the fact you don't have any DNS record to point the www subdomain for the domain embark-church.org !

You can issue that case by adding a new DNS record from your digitalocean admin panel , so that the subdomain 'www' points well your IP.

I hope this could be helpful to you. Feel free to tell if if it solved your issue ;)

See ya and enjoy all those incredible and amazing cloud solutions !

--
rustx

  • Unfortunately, I've made the changes, and now another issue has come up.

    I can't manage to find the "you're freakin awesome" button on here. Frankly, I'm not satisfied with the lack of this function. We're going to have to make some changes.

    Thank you!

  • Hi David,

    Don't give up for now, the DNS propagation can be long sometimes, regarding the TTL you use.
    According to me it is working fine if you ask if Google did propagate your changes :

    dig www.embark-church.org @8.8.8.8 +short
    embark-church.org.
    104.131.52.152
    

    As DigitalOcean has 3 DNS servers, you just need to wait that the change is propagated sot that your ISP DNS servers can update accordingly (can take like 12 hours or 2 days depending on your ISP).

    So, if you want to see the change right now, you can modify your resolv.conf file to manually add a DNS resolution inside :

    echo "104.131.52.152 www.embark-church.org" >> /etc/hosts
    

    This works when using either Linux or Mac OSx system. On Windows OS, you can open wordpad, and edit C:\system32/system/etc/hosts file

    I did it on my laptop locally, and it's working fine ;)

    Tell me if it did the trick ????

  • Howdy! I think you should re-read my last comment. But yes, it definitely worked. Thanks a million for your help.

  • You're welcome !

    I have no doubt you will see the "you're freakin awesome" button here once you have no more troubles with DNS ;-)

    Happy it could help

    ++

Have another answer? Share your knowledge.