Managed Path in SharePoint 2016/2013

This SharePoint tutorial we will discuss SharePoint managed path, how to create a managed path in SharePoint 2016/2013 from central administration and using PowerShell? We will also discuss how to delete managed path in SharePoint?

Follow the step by step tutorial to know how to create a managed path in SharePoint 2013/2016 using PowerShell and from central admin.

What is Managed Path in SharePoint 2013/2016?

In SharePoint, we can specify the custom path in URL namespace of a web application while creating site collections. This is known as a Managed path.

In SharePoint we have 2 types of Managed Paths, they are:

  • Wildcard inclusion
  • Explicit inclusion

Wildcard inclusion:

This allows Farm admin to create multiple Site Collections to the path that you specify. For example, if you add “/Sales” as a wildcard inclusion to your web application http://COSTCOSales.com, then you will be able to create multiple site collections with the newly added managed path.

Syntax: http://costcosales.com/Sales/{Your site collection Name}

Ex: http://costcosales.com/Sales/NewOffers

Explicit Inclusion:

This allows Farm admin to create only one Site Collection to the path that you specify. For examples, if you add “/finance” as an Explicit inclusion to your web application http://COSTCOSales.com , then you will be able to create only one site collection with the newly added managed path.



Note: All top level site collections are Explicit Inclusions.
Syntax & Ex: http://COSTCOSales.com/finance

Read some SharePoint 2013 tutorials on:

Create managed paths from SharePoint 2016/2013 Central Administration:

Now, we will see how can we create a managed path from SharePoint 2013/2016 central administration.

Log on to desired Application Server with FARM Administrator account

Open SharePoint 2016/2013 Central Administration and click on Application Management.

On the Application Management page, click Manage web applications.

managed path sharepoint
managed path sharepoint

Click the web application for which you want to manage paths, the ribbon becomes active.

In the Manage group of the ribbon, click Managed Paths.

managed path sharepoint 2016
managed path sharepoint 2016



On the Define Managed Paths page, in the Add a New Path section, type the path to include.

Click Check URL to confirm the path name.

In the Type list, select either Wildcard inclusion or Explicit inclusion to identify the type of path.

The Wildcard inclusion type includes all paths that are subordinate to the specified path. The Explicit inclusion type includes only the site that is indicated by the specified path. Sites subordinate to the specified path are not included.

Click Add Path.

When you have finished adding paths, click OK.

managed path sharepoint 2013
managed path sharepoint 2013

Delete managed paths from SharePoint Central Administration

Below is the step to delete a managed path in SharePoint from central admin.

Log on to desired Application Server with FARM Administrator account

Open Central Administration and click on Application Management. On the Application Management page, click Manage Web Applications.

Click the web application for which you want to manage paths. The ribbon becomes active. In the Manage group of the ribbon, click Managed Paths.

On the Define Managed Paths page, in the Included Paths section, click the check box next to the path that you want to remove. Click Delete selected paths.




managed path sharepoint online
managed path sharepoint online

Add & Delete managed paths from PowerShell in SharePoint 2013/2016

As we all know any operation in SharePoint can be performed from PowerShell. We will see how to create managed path SharePoint 2013 PowerShell.

Adding Managed paths using PowerShell:

Wildcard inclusion:
Syntax:
NEW-SPManagedPath “<managed path name>” –WebApplication “<web Application URL>”

Example:
NEW-SPManagedPath “Offers” –WebApplication “http://COSTCOSales.com”

Explicit inclusion:
Syntax:
NEW-SPManagedPath “<managed path name>” –WebApplication “<web Application URL>” -Explicit

Example:
NEW-SPManagedPath “Offers” –WebApplication “http://COSTCOSales.com” –Explicit

Deleting managed paths using PowerShell:

Sysntax:
Remove-SPManagedPath [-Identity] <ManagedPathName> -WebApplication <WebApplication>

Example:
Remove-SPManagedPath [-Identity] Offers -WebApplication “http://COSTCOSales.com”

Create a managed path in SharePoint using PowerShell

This PowerShell SharePoint tutorial explains, how to create and remove managed path using PowerShell for a web application in SharePoint 2013/2016.

If you are new to Managed path in SharePoint, check out my article on managed path in SharePoint 2013/2016 as well as how we can create a managed path using browser from central administration.

Create managed path SharePoint 2013 PowerShell

We can also create managed path using SharePoint 2013 management Shell (PowerShell) in SharePoint 2013.

For Explicit inclusion

For explicit inclusion managed path, below is the PowerShell command, we we need to add -explicit parameter.

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
New-SPManagedPath "/Technology" -WebApplication "http://mynewwebapp:42885/" -explicit
create managed path sharepoint 2013 powershell
create managed path sharepoint 2013 powershell

Now if you will create a site collection, then in the URL you will be able to see the path created like below:

create managed path sharepoint 2016 powershell
create managed path sharepoint 2016 powershell

For Wildcard inclusion:

If you will not mention the -explicit parameter then it will become Wildcard inclusion. The command will be looks like below:

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
New-SPManagedPath "/Finance" -WebApplication "http://mynewwebapp:42885/"
how to create managed path in sharepoint 2013 using powershell
how to create managed path in sharepoint 2013 using powershell

Once you will run it will display like below:

how to create managed path in sharepoint 2016 using powershell
how to create managed path in sharepoint 2016 using powershell

After this when you will create the site collection, it will display like below:

Remove managed path using PowerShell in SharePoint

We can use the below PowerShell command to remove managed path in SharePoint 2013/2016.

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Remove-SPManagedPath -Identity "/Finance" -WebApplication "http://mynewwebapp:42885/"

It will ask a confirmation message and once you click on Yes, it will remove.

remove managed path sharepoint 2013 powershell
remove managed path sharepoint 2013 powershell

This is how to create managed path in SharePoint 2013 using PowerShell.

You may like following SharePoint 2013/2016 tutorials:

Conclusion

Here we had discussed what is managed path in SharePoint? How to create a managed path from SharePoint 2013 central administration? How to create a managed path using PowerShell in SharePoint 2013? And then we saw how we can delete managed path from central administration and by using PowerShell?

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

>