A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq
Showing posts with label alternate access mapping. Show all posts
Showing posts with label alternate access mapping. Show all posts

Thursday, November 22, 2012

SharePoint 2013 - Setup multiple URLs in DNS and configure Alternate Access Mappings


In the previous article “SharePoint 2013 - Setup DNS and use FQDN to access SharePoint sites” you learned how to setup DNS and use FQDN to access sites in SharePoint 2013. In this article, you will learn how to add new URLs for different sites (departments). For example, you can setup a URL for your finance department, HR department, etc.

1.       Now you have setup the domain services, you can use multiple URLs to access SharePoint sites. As mentioned in previous article, one way to access your SharePoint site is to use the machine name in the URL, for example, http://sp2013 (sp2013 is the machine name). With domain setup on your server, you can now access same site using URL like http://sp2013.walisystems.com. Please note that walisystems.com is the FQDN. Now, the fun part starts. We will setup a new URL www.walisystems.com to access your root site collection.

2.       Open Server Manager. Expand Roles. Expand DNS. Expand MACHINENAME. Expand Forward Lookup Zones. Right-click FQDN and select New Host (A or AAAA)….


3.       In the Name box, enter www. In the IP address, enter IP.

 



To find the IP of your machine, go to command prompt and run IPCONFIG command. Note down IPv4 Address. This is the IP of your machine.



After entering the IP, click Add Host button. This will add a new A record.

 



4.       Now, we will create a new web application and site in SharePoint that will use this new URL. Open Central Administration site. Click Application Management. Click Manage web applications.

 



You will see there are two web applications (if it’s a new setup). One is your main site and the other central administration site.

5.       Click New button in the ribbon to create a new web application. A form will open.




 
6.       Enter 80 in the Port. Enter www.walisystems.com (Your A Record that you created above) in the Host Header. Keep all other default values and click OK.

 

7.       Next, create a new site collection. On the Application Management page, click Create Site Collections. From the Web Application drop down, select newly created web application.

 

8.       Enter Title and Description of the site collection.

 

9.       In Web Site Address section, in URL drop down, select / (front slash) for the root site collection. You can only create one top level site collection per web application. For more site collections, you have to create managed paths. There is a link called Define Managed Paths in Web Site Address section (on the same page). Also, if you have already used root site collection, Create Site Collection page will automatically show you /sites/  managed path. If you want to use a managed path then you have to enter a site collection name in the text box after the drop down.

 

10.   In the Template Selection, keep 2013 selected in the experience version drop down. Keep Team Site  selected under Collaboration tab.

 

11.   Enter Primary Site Collection Administrator.

 

12.   Click Ok to create site collection.

 

13.   When new web application is created, a default entry is automatically added in the Alternate Access  Mappings. To see the new entry for your web application, on the Application Management page, click Configure alternate access mappings. You will see new web application listed and the zone will be Default.

 

14.   Now, let’s add another URL for the HR department. Repeat steps 2 and 3 above to add a new host entry but instead of entering www, enter hr. IP will remain same.

 

15.   Now, you can create a new web application and site collection for the HR department just like you did above OR you can use an existing web application. You have already seen how to create new web application and use new URL. Now you will existing web application that you created above and use Alternate Access Mappings to forward new URL to that web application.

 

16.   On the Application Management page, click Configure alternate access mappings link.

 

17.   Click Add Internal URLs.

 

18.   From the Alternate Access Mapping Collection drop down, select the newly created web application.

 

19.   Enter new URL (new host entry for the HR department, for example, http://hr.walisystems.com) in the URL protocol, host and port field.

 

20.   In the Zone drop down select Custom.

 

21.   Click Save.

 

22.   Open new URL (http://hr.walisystems.com) in the browser. Your new site collection will open.

 

 

I hope information in this article was useful for you. Please do leave feedback in the comments below.  Thanks for reading!

 

SharePoint 2013 - Setup DNS and use FQDN to access SharePoint sites


In this article, you will learn how to create alternate URL for your SharePoint 2013 site. By default, you can access SharePoint site by using machine name, for example, if your machine name is MYCOMPANY, you can access SharePoint site using URL http://mycompany (provided you have a site collection set up at that URL). Now, suppose you want to have a meaningful URL for your site, for example, www.mycompany.com OR if you have different departments in your company and you want each department to access their site using their own URL, for example, http://hr.mycompany.com, http://finance.mycompany.com ,  etc., this can be achieved by configuring DNS. My assumption is that you have admin rights on the machine and you can add DNS role and configure it. To read more about SharePoint 2013 machine configuration, wait for my upcoming book on SharePoint 2013. I am just trying to finish up some new chapters. I may not wait till all chapters are ready and may release machine configuration part separately so stay tuned to this blog. In the steps below, you will add Active Directory Domain Services and set up a FQDN.

1.       Go to All Programs > Administrative Tools  and click Server Manager.

2.       Click Roles and then click Add Roles link.

3.       Click Next and then select the second check box Active Directory Domain Services and click Next >. Click Next again and then click Install. Installation will start and will take approx. 10 minutes to complete (depending on your computer’s speed). Click Close once the installation has completed.

4.       Click Active Directory Domain Services link. You will see following warning message:

This server is not yet running as a domain controller. Run the Active Directory Domain Services Installation Wizard (dcpromo.exe).

Click the link in this message to install Active Directory Domain Services.

5.      Click Next. Click Next again. Select the second option Create a new domain in a new forest and click Next.

6.      Provide a FQDN, for example, sp2013.com and click Next. I will use walisystems.com as that is my main domain. You will see this domain in the screenshots in this section.

7.      Select Windows Server 2008 from the drop down and click Next.

8.      Keep DNS server checked and click Next.

9.      You will see a warning message. Select first option Yes, the computer will use dynamically assigned IP address (not recommended). if you don’t want to assign a static IP to your computer  and click Next. If you want to make the change, assign static IP and run the wizard again.

10.  Next you may see this error:

 


 



Click Yes.


11.  You will be presented with another screen. Keep default values and click Next.

12.  Enter password for Directory Services Restore Mode Administrator Mode and click Next.

13.   Review your selections and click Next. DNS Installation starts.

14.  Click Finish after the installation has completed.

15.  Click Restart Now button to restart your machine.

16.   Open Server Manager again. Expand Roles. Expand Active Directory Domain Services. Expand Active Directory Users and Computers. You will see your domain listed there.


 



17.   Now you have setup the domain services, you can use multiple URLs to access SharePoint sites. As mentioned earlier, one way to access your SharePoint site is to use the machine name in the URL, for example, http://sp2013 (sp2013 is the machine name). With domain setup on your server, you can now access same site using URL like http://sp2013.walisystems.com. Please note that walisystems.com is the FQDN that we used while setting up DNS.

 
In the next article, you will learn how to add multiple URLs for different departments and configure Alternate Access  Mappings in SharePoint.

 
If you liked this article or gained something out of it, then please leave feedback. Your feedback is of paramount importance to me. Thank you for reading.

SharePoint 2013 Alternate Access Mapping


Alternate Access  Mapping (AAM) is a feature that allows a website to use different URLs. This is usually needed when you have different zones, for example, one for the Intranet and another for an Extranet. I will not cover the network configuration part to setup an alternate URL in the DNS. I assume you already have an alternate URL and you just want to configure the AAM. If you want to read about DNS configuration and how to setup alternate URLs in the DNS, read my upcoming book on SharePoint 2013 (name not decided yet) or wait for another blog post that will explain the process of setting up DNS.

Assuming you have following two URLs, the process to configure AAM is easy.

1.       http://sp2013

2.       http://sp2013.server.com

 

1.       Open Central Admin Site and click Application Management.

2.       Under Web Applications, click Configure alternate access mappings.

3.       You will notice you already have http://sp2013 listed there in the Default zone. To add new URL in the Intranet zone, click Add Internet URLs.

4.       From the Alternate Access Mapping Collection drop down, select correct application that you want to use for the AAM setting and then add URL in the text box labeled URL protocol, host and port, for example, http://sp2013.server.com.  From the Zone dropdown, select Intranet.

5.       Click Save.