Create a wild card DNS zone for SharePoint APPS

This post has been republished via RSS; it originally appeared at: SharePoint Support Blog articles.

Summary

 

To support installing and publishing APPS from your SharePoint Farm you will need to configure DNS to support a wild card host names for the specified app domain. This blog will demonstrate a quick way to configure your Microsoft Active Directory integrated DNS Server to support SharePoint Apps.

 

Note: The steps in this blog is just a tip to configure DNS and does not get into configuring Apps. See the resource section for more information on how to configure your Apps for your Farm. 

 

Why is this needed?

 

The APP URL will be created based from the App domain and App prefix settings in Central Admin.

 

Example:

 

 

When installing an APP from a SharePoint Site, a random url will be used for your new app (which will need to be accessible in DNS).

 

I will demonstrate this by installing a free "YouTube Feeds" app.

 

Access the "SharePoint Store":

 

 

 

Find the desired app to be installed:

 

 

 

Choose "ADD IT":

 

 

Choose "Trust it" to install the app into SharePoint:

 

 

Now the app will be accessible in your native App list, just like the OOTB Apps:

 

 

After the app is added it will be given a random name based on your settings as described above.

 

 

 

Example of a successful app installation:

 

 

If name is not accessible in DNS, accessing the app will fail.

 

 

How to make it work

 

To make this work, you will need a new forward lookup zone in DNS that matches the App domain you specified in the App URL settings from above. Once you have a forward zone, create wildcard CNAME that points to your WFE.

 

Note: This name can be a load balanced name or a single server depending on your configuration. For this simple test case, I have a single WFE.

 

To create the required settings, you can use the dnscmd utility or just use the DNS management tool.

 

Here are the commands using the dnscmd utility:

 

To create an AD Integrated forward zone:

 

dnscmd michlee-server5 /zoneadd 2016apps /dsprimary

 

To add a wild card cname in the new zone:

 

dnscmd michlee-server5 /recordadd 2016apps * CNAME michlee-sp-wfe.mylab.selfhost.corp.microsoft.com

 

After running these commands your DNS settings will look like this:

 

 

 

As you can see pinging a random name in this zone will respond from the WFE sever.

 

 

 

Resources

 

Configure an environment for apps for SharePoint Server
https://technet.microsoft.com/en-us/library/fp161236(v=office.16).aspx

 

Dnscmd Syntax
https://technet.microsoft.com/en-us/library/cc756116(v=ws.10).aspx#BKMK_14

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.