Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm using CentOS, LAMP and Wordpress.org I have added and edited a virtual host on the apache server. For servername I put the hostname that is output when I typed the command hostname. Now I'm accessing my website by typing ipaddress/wp-admin. But I want to access it through the domain name. Doing some research I found out that I have to update my domain’s DNS records. How do I do that or is there another way to do it?

For iptables I only enabled port 80 or http access.

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

You'll need to create an A record to point the domain to the servers IP address.

  1. Log in to your domain registrar control panel or wherever your DNS records are controlled.
  2. Create a new A record.
  3. Set the domain.com. as the host and the value as the IP address.
  4. Allow up to 24 hours for the DNS record to propagate.

For example:-

  • Host: clubnetsem.com.
  • Type: A
  • Value: 149.255.56.109
share|improve this answer
1  
Personal note: Some ISP's cache DNS records longer than 24 hours - Haven't ever heard of more than 48 though. –  Frederik Spang Mar 19 at 20:24
1  
This is true, some ISP's are particularly slow at updating DNS cache so in the rare event, you may have to wait longer than 24 hours. Thanks @FrederikSpang –  zigojacko Mar 20 at 8:14
add comment

I am going to be rather general since there is a lot I do not know about your specific scenario.

If it just for your access, you can use the host file on your client computer. I do not do this but a friend of mine uses host files exclusively and has for more than 20 years. You can check out: http://en.wikipedia.org/wiki/Hosts_(file)

I use a separate internal DNS server for my work. You can install Bind or other DNS software on your web server if you are not making it public. If you are making it public, then I would use a DNS host. This is because I would not open DNS vulnerabilities on my web server if it was public.

If you already have a domain name hosted, and you want to use a sub-domain, then you can use a CNAME or A record to point to this server. If you do not have a domain name hosted, then consider registering a usable domain name (if you want to) and creating a record in a DNS host.

Each DNS host has a different interface so I cannot get too specific on this. I have not kept up with these too much.

If the server is not to be public, make sure you are using a non-routable IP address such as 10.0.0.100 to help keep it private.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.