Thursday, July 25, 2013

How to Rename SharePoint Web Application Name and URL

We may want to change a web application name to make a consistency in naming conventions or in some other scenarios. But I don't find any SharePoint Central Administration options to rename a web application! So how to rename SharePoint 2010 web application Name? well, PowerShell can help!

Rename SharePoint web application name using PowerShell: 
PowerShell can be used to rename web application name in SharePoint 2010. Lets rename SharePoint web application using PowerShell 

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Function to Rename SharePoint Web Application
Function RenameWebApp($OldName, $NewName)
{  
   #Get the Web Application by its Name
   $WebApp =Get-SPWebApplication | where {$_.Name -match $OldName}

   #sharepoint 2010 rename web application powershell
   $WebApp.Name= $NewName

   $WebApp.Update()
   Write-Host "Web Application Name Changed from: $($OldName) to $($NewName)"
}

#Call the function to Rename Web App
RenameWebApp "External Site" "Extranet"

However, this PowerShell script just renames the web application name but not the URL! I don't find a way in SharePoint 2010 to rename web application with PowerShell.

How to Rename SharePoint web application URL
To rename a web application URL in SharePoint, We've to update the DNS entries, Alternate access mapping (AAM) in Central Administration and update the Host header bindings in IIS.

To Rename SharePoint 2010 web application URL, lets update the AAM entries first. Go to: Central Administration >> System Settings >> Configure alternate access mappings under Farm Management. Pick your web application and give a new URL to it.
how to rename sharepoint 2010 web application

Update HOST Name in IIS Bindings to rename SharePoint Web application URL:
Next step is to update IIS bindings. Go to IIS (Start > Run > InetMgr), Select your target web application, Click on "Bindings" on right pane.
how to change web application url in sharepoint

Click on "Edit" and then update the "Host Name" with new URL for the web application.
sharepoint change url of web application
That's all! we are done. The above steps applicable to SharePoint 2007 also to change web app URL.
You can extend an existing SharePoint web application to give a new Name and URL for it!



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

4 comments :

  1. The portion after renaming the Web App helped alot! Thanks tons!!

    ReplyDelete
  2. The proper way would be to delete the webapplication and recreate it with the new URL because there are still references to the old URL in the ConfigDB that will give you issues later. Just keep your DBs and reattach them after the fact.

    ReplyDelete
    Replies
    1. where is it? noob gg rekt

      Delete
  3. For SharePoint 2013, this technet provides a good overview on the URL portion of the rename/change http://technet.microsoft.com/en-us/library/cc262366(v=office.15).aspx

    ReplyDelete

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...