How to get rid of /tfs in TFS URL

There are two ways to get rid of /tfs in TFS URL. First is to unconfigure TFS application tier and pick a URL without /tfs when re-run TFS application tier configuration wizard, and second is configure IIS TFS site without /tfs.

In the first option, to unconfigure TFS application tier open the Team Foundation Administration Console on the Application Tier machine. Click on the server name and click on "Remove Feature". You can do the same from command prompt, execute TfsConfig setup /uninstall:ApplicationTier command to unconfigure TFS Application Tier. By removing the feature, we will be removing:

  • The Application Tier configuration from the server (but we don't remove the binaries)
  • Connection with Data tier (but the databases won't be deleted)
  • TFS Website.
  • TFS Application Pools
  • TFS Services (The Visual Studio Team Foundation Server Job Agent)

Then, when re-running the configuration wizard, pick the URL you want on the website settings page.

In the second option, first add port 80 and 443 to the list of TFS IIS ports

  1. Open IIS Management Console
  2. Browse to Team Foundation Server site
  3. Click on Bindings
  4. Add port 80 to http
  5. Add port 443 to https. Make sure pick the proper SSL certificate from the list

 Then, switch to / for TFS instead of /tfs

  1. Open IIS Management Console
  2. Browse to Team Foundation Server site, then /tfs web app under it
  3. Click on Basic Settings on the left menu
  4. Copy Physical Path value
  5. Go to up to Team Foundation Server site, click on Basic Settings on the left menu
  6. Replace Physical Path value with the one copied from /tfs web app
  7. Click OK to Save the changes
  8. Click on Authentication
  9. Make sure Windows and Anonymous authentication options are enabled
  10. Remove /tfs web app
  11. Update TFS Admin Console to use new public URL

I prefer the second option, but both options are good. Also, consider putting effort into redirecting old URLs to new ones.