locked
Adding DNS A record when creating sharepoint 2010 web app RRS feed

  • Question

  • Hi,

    I notice that there is a technique of adding a DNS A Record when adding a Sharepoint 2010 web application. What is the purpose of doing this?

    Thanks

    Tuesday, May 1, 2012 10:21 PM

Answers

  • A required property of all web applications is a URL. This URL is what users use to access the web application. By default, the create a new web application UI will default to creating a URL that uses the SharePoint server's hostname and a random port above 1024. This may be fine for small web applications that are not used by many users (perhaps a development environment, for example) but is usually not suitable for most web applications.

    For example, a web application that hosts your company's intranet. Will users prefer a URL such as http://spwfe01:31756 or http://intranet.company.com?

    This is where the DNS A record is needed. In 99% of cases the server name is not "intranet.company.com" (and when it is, it is possible that Windows will have likely already created an A record), and for farms with more than one server you can't name all of them "intranet.company.com" or for farms that serve multiple web applications the server can't have multiple server names ("intranet.company.com", "www.company.com").

    When users type "http://intranet.company.com" into their browsers, their computer will query your DNS servers for the location of intranet.company.com. This location could be a server, or a load balancer, or something else that will direct the users to your farm. Without the A record users wouldn't be able to get to your web application.


    Jason Warren
    Infrastructure Specialist
    Habañero Consulting Group
    www.habaneros.com/blog

    Wednesday, May 2, 2012 12:05 AM
  • Alternate access mappings in the central config are required to be used to know which web application/content database to send your SharePoint user to. The DNS A record is the name (or defined access mapping) to the cluster or server IP address of the SharePoint front end servers. So you must have an internal DNS A Record for users and an external A Record that points to your NAT IP to the SharePoint site or however you have that piece setup so that it can match the name entered into your browser to know what site/content data to direct you to. 
    Wednesday, May 2, 2012 4:46 AM

All replies

  • A required property of all web applications is a URL. This URL is what users use to access the web application. By default, the create a new web application UI will default to creating a URL that uses the SharePoint server's hostname and a random port above 1024. This may be fine for small web applications that are not used by many users (perhaps a development environment, for example) but is usually not suitable for most web applications.

    For example, a web application that hosts your company's intranet. Will users prefer a URL such as http://spwfe01:31756 or http://intranet.company.com?

    This is where the DNS A record is needed. In 99% of cases the server name is not "intranet.company.com" (and when it is, it is possible that Windows will have likely already created an A record), and for farms with more than one server you can't name all of them "intranet.company.com" or for farms that serve multiple web applications the server can't have multiple server names ("intranet.company.com", "www.company.com").

    When users type "http://intranet.company.com" into their browsers, their computer will query your DNS servers for the location of intranet.company.com. This location could be a server, or a load balancer, or something else that will direct the users to your farm. Without the A record users wouldn't be able to get to your web application.


    Jason Warren
    Infrastructure Specialist
    Habañero Consulting Group
    www.habaneros.com/blog

    Wednesday, May 2, 2012 12:05 AM
  • I see. Is this necessary for users accessing from outside the network? Am I right in thinking that the A record either rewrites or redirects the url? So spwfe01:31756 is redirected or rewritten to intranet.company.com

    I know that A Records are just hostname-to-IP mapping (I use them in my AD) so am I correct or missing something?

    Wednesday, May 2, 2012 12:23 AM
  • Alternate access mappings in the central config are required to be used to know which web application/content database to send your SharePoint user to. The DNS A record is the name (or defined access mapping) to the cluster or server IP address of the SharePoint front end servers. So you must have an internal DNS A Record for users and an external A Record that points to your NAT IP to the SharePoint site or however you have that piece setup so that it can match the name entered into your browser to know what site/content data to direct you to. 
    Wednesday, May 2, 2012 4:46 AM