# domain masters/owners what does your A record look like?



## Easy Rhino (Jan 11, 2010)

before i make an attempt and screw it all up, id like some feedback on a proper way to setup an A record.  currently i have

*.example.com pointing to my server ip address.

this works great since i have mail.example.com setup in apache as a virtual server. so no issues with that.

however i would like http://example.com to also point to the server, but it replies with a DNS error when searching for it in the browser. so it has to be www.example.com for it to open the home page. how should i edit my A record so that i can also reach it without using www ?


----------



## Easy Rhino (Jan 12, 2010)

anyone?


----------



## Solaris17 (Jan 12, 2010)

have you tried just adding another entry to your record?


----------



## Munki (Jan 12, 2010)

this technically gets done usually both in the Web Server configuration and DNS. In Apache Web Server it is a "ServerAlias". In DNS it's just another A record in the configuration for that domain name.


----------



## Easy Rhino (Jan 12, 2010)

Munki said:


> this technically gets done usually both in the Web Server configuration and DNS. In Apache Web Server it is a "ServerAlias". In DNS it's just another A record in the configuration for that domain name.



right, but what would the A record be for it? i have the virtual servers/alias already setup for the subdomains. thanks.


----------



## Munki (Jan 12, 2010)

Easy Rhino said:


> right, but what would the A record be for it? i have the virtual servers/alias already setup for the subdomains. thanks.



Are you hosting this or are you renting?

If you are renting....contact them and tell them to fix that for you.

If you are hosting....You want to be sure both www.example.com and example.com both have the same IP addy. 

For virtual servers your gonna wanna edit a file for Apache. I think its 'httpd.conf'

So Example

<VirtualHost *>
  DocumentRoot /home/www/web
  ServerName www.example.com
  ServerAlias example.com
</VirtualHost>


Your file should look similar....



hope this helps


----------



## Easy Rhino (Jan 12, 2010)

ok i added a blank A record entry for my domain to point to my my server ip. and so now when i put in example.com in the browser it routes me to www.example.com which is better since when i put in example.com it said DNS error.

however, i want it to stay as example.com. i added a VirtualHost entry in my sites-enabled section of apache (that is how it works in ubuntu). i may be missing 1 step.

edit: i am the host
edit2 note: my whole system runs fine. i am just being anal and would like for the domain name to stay example.com if it is typed that way into the browser. just like techpowerup.com works.


----------



## Munki (Jan 12, 2010)

Easy Rhino said:


> ok i added a blank A record entry for my domain to point to my my server ip. and so now when i put in example.com in the browser it routes me to www.example.com which is better since when i put in example.com it said DNS error.
> 
> however, i want it to stay as example.com. i added a VirtualHost entry in my sites-enabled section of apache (that is how it works in ubuntu). i may be missing 1 step.
> 
> ...



Arent we all anal? 


Try swaping www. and not www in the file



oh...have your tried a Mod_Rewrite in an .htaccess file?


----------



## W1zzard (Jan 12, 2010)

just add another a record
foo.com. A 127.0.0.1

note the . at the end that signifies you are listing a fqdn


----------



## Easy Rhino (Jan 22, 2010)

i finally got around to working on this. all i had to do was create a virtualhost with serveralias as simply the domain name pointing to the proper document root. simply fix.


----------

