How to Make More Than One URL Link to Your SharePoint Site


It's destiny; today I've learned a very awesome lesson in SharePoint deployment. I was working on a project and today was the day of it's live deployment. After successful completion of the deployment, we found that when we write http:///sitename.com; it works fine, but when we write http://www.sitename.com/; it goes to a 404 page, and that causes a headache for us. After a lot of mobile phone calls with the customer and managers, my mobile phone shut down his mouth and I started to play with IIS 7 and Sharepoint Central Administration until I found the solution of this problem. I was so so so happy and Thank God that the site now is live and working correctly....

First of all , you must do the following at Sharepoint Central Administration:

  1. Open Sharepoint Central Administration:

    Sharepoint1.gif
     
  2. Click on the Operation Tab:

    Sharepoint2.gif
     
  3. Click on Alternate Access Mappings:

    Sharepoint3.gif
     
  4. Then Click on Show all, then change the Alternate Access Mapping Collection:

    Sharepoint4.gif
     
  5. From here select the site you need to have more than one url to access:

    Sharepoint5.gif
     
  6. Click on Add on Internal URLs:

    Sharepoint6.gif
     
  7. Add the second URL you want to add, and make the Zone equal to Default:

    Sharepoint7.gif
     
  8. By adding the second URL with zone equal to Default, this will make the second URL look at the first default site URL; you already have:

    Sharepoint8.gif
     
  9. There is missing step; by doing it, both URLs will work; this step will be done in IIS:

    I've made this step on IIS 7.0, first of all open IIS by running inetmgr, then open the tab of all sites you have, then make a right-click on your site, then click edit bindings. You will find a binding which is added with the URL of your site. Click the add button, then write the new URL you added in the Alternate Access Mappings page in your SharePoint central administration, with the same port number and the same properties.

By that both URLs will work successfully. Just be sure to configure your web.config to work as if the URL is the first default one you had before adding any other URLs...