Go Back   AnandTech Forums > Hardware and Technology > Networking

· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· AMD Video Cards
· Nvidia
· Displays
· Memory and Storage
· Power Supplies
· Cases & Cooling
· SFF, Notebooks, Pre-Built/Barebones PCs
· Networking
· Peripherals
· General Hardware
· Highly Technical
· Computer Help
· Home Theater PCs
· Consumer Electronics
· Digital and Video Cameras
· Mobile Devices & Gadgets
· Audio/Video & Home Theater
· Software
· Software for Windows
· All Things Apple
· *nix Software
· Operating Systems
· Programming
· PC Gaming
· Console Gaming
· Distributed Computing
· Security
· Social
· Off Topic
· Politics and News
· Discussion Club
· Love and Relationships
· The Garage
· Health and Fitness
· Home and Garden
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals with Free Stuff/Contests
· Black Friday 2015
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions

Thread Tools
Old 02-27-2007, 03:15 PM   #1
Golden Member
Join Date: Apr 2002
Posts: 1,407
Default Can you create two different DNS records that resolve to same IP?

I want to host multiple sites and URL's on the same web server that has single IP.
I usually just add the subsequent DNS records as CNAME for DNS so that when the request comes in, the server would know which site to serve.

Now, would it be better if I were to create two seperate forward DNS records?

How about the reverse DNS records? Can you have an IP resolved to two different names?
Cooky is offline   Reply With Quote
Old 02-27-2007, 03:32 PM   #2
Diamond Member
Join Date: Jul 2001
Posts: 9,617
Default Can you create two different DNS records that resolve to same IP?

You can absolutely use multiple A records to refer to the same IP. If you are hosting a web site Apache has a special directive known as NameVirtualHost in which you specify the IP address of the server then use the ServerName directives to tell apache what to do with the URL (which files to serve) I currently host over 200 web sites on a single IP for a client, the only caveat is when you need to run SSL (for a shopping cart) that site then needs to be hosted on it's own IP address as SSL binds to port 443 and will only serve up one certificate per IP (so if you host two sites on one IP, only one site can have SSL, if you try to access https for the other site then you will receive a lot of warnings about the certificate not matching the host etc.)
DaiShan is offline   Reply With Quote
Old 02-27-2007, 03:37 PM   #3
No Lifer
spidey07's Avatar
Join Date: Aug 2000
Posts: 65,476
Default Can you create two different DNS records that resolve to same IP?

Best practice is to only have a single A record for a host. CNAMEs for any other aliases/urls. I don't think you can have mulitple reverse look up records and even if you can it sounds like a bad idea.
spidey07 is offline   Reply With Quote
Old 02-27-2007, 03:44 PM   #4
Diamond Member
dphantom's Avatar
Join Date: Jan 2005
Posts: 3,752
Default Can you create two different DNS records that resolve to same IP?

Yes, use cnames. Done all the time especially with web servers.

No, do not use multiple PTR's.
"War is an ugly thing, but not the ugliest of things. The ugliest is the man who thinks nothing is worth fighting and dying for and lets men better and braver than himself protect him." - John Stuart Mill, 1859
"To lodge all power in one party and keep it there is to insure bad government." - Mark Twain
dphantom is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 04:40 PM.

Powered by vBulletin® Version 3.8.8 Alpha 1
Copyright ©2000 - 2016, vBulletin Solutions, Inc.