Quantcast
Channel: SharePoint Diary
Viewing all articles
Browse latest Browse all 1058

How to Rename SharePoint Web Application Name and URL

$
0
0
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!

Viewing all articles
Browse latest Browse all 1058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>