Saturday, July 23, 2011

SharePoint 2010 – How to create vanity URL for sub site

How to create a short URL or vanity URL for SharePoint Site, can be done, but it is NOT done through SharePoint. You would create it through IIS.

I don’t have my SharePoint installation in front of me so am doing this from memory, thus not entering the exact step by step at the detail I normally do. Email me if you have questions.

To understand what we are doing below, we are going to create one IIS virtual empty site for each sub-site you want a vanity URL for, and simply redirect that site to the exact absolute URL of the sub-site. We will create one application pool that is separate from the existing SharePoint application pools, and all vanity URLs share that one app pool to save resources.

  1. Go to IIS.
  2. Go to SITES right click and ADD a Web Site.
  3. Name = SharePointVanityURLs  (This is so the App Pool can be named this, and they will all share the one app pool to save memory, you will rename this site to your first redirected hostname later)
  4. Create New Application Pool = SharePointVanityURLs
  5. Physical Path = c:\inetpub\wwwroot\wss\VirtualDirectories\1stVanityName
  6. Host Name: 1stVanityName
  7. OK
  8. Click on your new web site.
  9. Right click and select RENAME and change the name of the web site to 1stVanityName.
  10. In the Actions Pane click Edit Permissions – Add Authenticated Users and click OK.
  11. Click on your new web site.
  12. In IIS section click Authentication – disable anonymous (unless using it) – enable Windows Authentication.
  13. Still focused on the Windows Authentication in the right pane click Advanced Settings and deselect Enable Kernel-mode authentication.
  14. Click on your new web site.
  15. In IIS section, click HTTP Redirect.
  16. Check Redirect requests to this destination.
  17. Enter your absolute URL to your sub-site without the home page entered.
  18. Check Redirect all requests to exact destination.
  19. In the right pane click Apply.
  20. Click on your new web site.
  21. Right click and select Manage Web Site – Restart.
  22. Enter a DNS record for this new vanity URL or short URL with an IP address that points to your Web Front End server or if using Load Balancing your VIP address.
  23. Flush DNS server cache and client cache if needing to test right away. Client is Command Prompt type IPCONFIG /flushdns .

Repeat steps above for each vanity URL, but the remain web sites on #4 select to use the existing App Pool “SharePointVanityURLs” instead of creating new ones.

That’s it, it is that easy Smile

6 comments:

  1. Thanks for an excellent tutorial. Helped a lot.

    Mike

    ReplyDelete
  2. I appreciate your effort in putting this, thanks!

    ReplyDelete
  3. Thanks for sharing this SharePoint application pools.

    ReplyDelete
  4. Thanks for the post however I've never done anything with our DNS server. Could explain the piece or point me in the right direction?
    Thanks!

    ReplyDelete
  5. Linda - Thank you for posting the details. Does this process need to happen on every WFE?

    ReplyDelete