Skip Ribbon Commands
Skip to main content
Wen He > Posts > Maximum URL Length of 260 Chars still Exists in SharePoint 2010
June 25
Maximum URL Length of 260 Chars still Exists in SharePoint 2010

There's a maximum URL length of 260 chars for SharePoint 2007. I had hoped that would change in SharePoint 2010 but it didn’t. Here’s my test result:

1.  The full URL path limit (260 chars) does include the Web application host name: http://Portal.Contoso.com/sites, but does not include the suffix: /Forms/AllItems.aspx. See the example below:

This test URL has 280 Chars that includes: http://portal.contoso.com/sites + SiteName + SubName + Document Library Name + /Forms/AllItems.aspx:

http://portal.contoso.com/sites/TeamMate/SiteNameABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZSiteNameABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGH/ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ/ABCDEFGHIJKLMNOPQRSTUVWXYZABCdefghijklmop/Forms/AllItems.aspx

After remove the suffix /Forms/AllItems.aspx in the URL is the allowed 260 Chars

http://portal.contoso.com/sites/TeamMate/SiteNameABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZSiteNameABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGH/ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ/ABCDEFGHIJKLMNOPQRSTUVWXYZABCdefghijklmop

2. So the max 260-char full URL path is what we will have to work with from the Web application host all the way to the file name and extension:

http://portal.contoso.com/sites/ --> team site name --> sub site name (if any) --> document library name --> filename + extension.

3. When the max 260 chars is reached, as in the above example, you would not be able to upload documents without getting errors. However you might still be able to upload short documents to the library but you would not be able to open it and you would get the following error msg:

The URL for this file is too long for the application. A temporary copy of this file will be opened on your computer. You must save this copy as a new file.

260 chars is not a whole lot for a directory and filename structure, therefore, here’re the guidelines:

  1. Prefer short URL names for sites and document libraries.
  2. For document libraries, start by creating them with a title you want as the URL and then rename the title to the display name of the library.
  3. Avoid excessively long folder names and file names. Use descriptive but short file names.
  4. Avoid excessively deep folder structures in document libraries, better create a few more document libraries.

Wish there is a way to work around this limitation. Let me know if you know where to start.  Thanks.  Wen

Comments

There are no comments for this post.