What parts of a URL count toward SharePoint path length?

Rick Lecoat 20 Reputation points
2024-07-31T17:27:04.28+00:00

Plenty of articles tell me that when calculating a the length of a SharePoint path, I ignore the server protocol and name, and start with (in the case of a business site) /sites. Those articles also often mention that parameters are not counted toward path length.

When calculating the path length from a decoded web URL then, should I be counting this (the bold part):

https://company.sharepoint.com/sites/SiteName/Shared Documents/Forms/AllItems.aspx?FolderCTID=0x012000283F45AAD7B07547B1F52BBDDDE6FF93&id=/sites/SiteName/Shared Documents/FolderName/Image.png

or this:

https://company.sharepoint.com/sites/SiteName/Shared Documents/Forms/AllItems.aspx?FolderCTID=0x012000283F45AAD7B07547B1F52BBDDDE6FF93&id=/sites/SiteName/Shared Documents/FolderName/Image.png

?

Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yanli Jiang - MSFT 31,596 Reputation points Microsoft External Staff
    2024-08-01T03:00:56.1+00:00

    Hi @Rick Lecoat ,

    When calculating the path length for a SharePoint URL, you should start counting from the /sites segment and ignore the parameters. So the query string parameters (?FolderCTID=...&id=...) are not included in the path length calculation.

    In your example URL, the path you would be counting is:

    /sites/SiteName/Shared Documents/Forms/AllItems.aspx

    For your references:

    https://support.microsoft.com/en-us/office/restrictions-and-limitations-in-onedrive-and-sharepoint-64883a5d-228e-48f5-b3d2-eb39e07630fa#filenamepathlengths

    https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/new-maxpath-limits-in-sharepoint-and-onedrive/ba-p/68273

    Have a nice day! :-)


    If the answer is helpful, please click "Accept as Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.