大网数据广告活动
网站运营与故障问答

What should the maximum length of a filename be, and would that affect SEO?

· 52CE 我爱测

I am working on an artist's portfolio website. Let's say I want each artwork's image filename to contain its basic information, like so: Category - Artwork Title - Size, Medium, Year.jpg In actual usage, the filename might become…

问题原文

原帖链接 · Feanne · CC BY-SA 3.0

I am working on an artist's portfolio website.

Let's say I want each artwork's image filename to contain its basic information, like so:
Category - Artwork Title - Size, Medium, Year.jpg

In actual usage, the filename might become long, like this:
Illusions and Existentialism Exhibit - The Imaginative Artwork Title - 12 x 18 inches, watercolor, 2010.jpg

My purposes for putting all that info in the image filename would be:

  • to keep the image files organized and readable (in the backend)
  • to retain that information in case people download the images
  • to pull data from the image filename to be displayed on the webpage

I know from here and here that Google guidelines encourage descriptive image filenames, but my example filename is 103 characters long. - is that too long?

Will there be any technical issues for filenames exceeding a certain number of characters?

Does it significantly slow down loading time?

I read here that 255 characters is a safe limit based on file system limitations, and that some browsers limit the URI to 1024 characters (but not sure what that means for my question). This other thread says 70 characters is a good safe limit, but I'm not sure how they came up with that number.

Will there be any other issues, like SEO-related issues?

Does it make it seem like it's spam / keyword stuffing?

I think the filename structure is focused on the artwork's actual description, and not keywords, so I hope it doesn't seem "spammy".

Can anyone point me to references that recommend a specific filename length limit, as well as the explanation for that limit?

已采纳解答

原帖链接 · David K. · CC BY-SA 4.0

  1. Keep the filename including its file extension below 255 characters. Just to be safe. The actual length doesn't really matter. Personally I have never seen a penalty coming from a too long filename. Just don't keyword stuff it!

  2. Take into account that some characters have different encodings (such as ä, ö, ü, é, etc.) making your filename actually longer.

  3. A 1024 character URL is way too long. Example:

http://www.google.com/dfgagagergtergadgvdrgg/kjsdfjsdfksdjhfskjdhfxksdjf-dsfsdafasdjndsfds-efdsfafadsfdsf/sadfkuhsdafjligjdigljdsklgdf-adsgkjadhgkjdfhgkjdafngdakfg-dfgkadfhgkajdfghkjahfdhgere/asdfkjshkfjsdkfhsdkjfhakjsdfdsf-sfddahfkjsdkdfsaf-sadkfjasdkjfhsdkjhfkreuhgkdnvmbnvrjhf-eferfgdgvdfsgdfsg/sdkfhksjdnfkajsdfkewjfrejslkcjsbykfchvclhdsfklesjdfyhglwearkhgiuferwjposfadfkfewrwersdf/dsf/sadfkuhsdafjligjdigljdsklgdf-adsgkjadhgkjdfhgkjdafngdakfg-dfgkadfhgkajdfghkjahfdhgere/asdfkjshkfjsdkfhsdkjfhakjdahfkjdshfksadfdsafksdfjasdkdfsaf-sadkfjasdkjfhsdkjhfkreuhgkdnvmbnvrjhf-eferfgdgvdfsgdfsg/sdkfhksjdnfkajsdfkewjfrejslkcjsbykfchvclhdsfklejkfhyhglwearkhgiuferwjposfadfkfewrwersdf/dsf/sadfkuhsdafjligjdigljdsklgdf-adsgkjadhgkjdfhgkjdafngdakfg-dfgkadfhgkajdfghkjahfdhgere/asdfkjshkfjsdkfhsdkjfhakjsdfdsf-sfddahfkjdshfksadfdsafksdfjasdkdfsaf-sadkfjasdkjfhsdkjhfkreuhgkdnvmbnvrjhf-eferfgdgvdfsgdfsg/sdkfhksjdnfkajwjfrejsl/Illusions and Existentialism Exhibit - The Imaginative Artwork Title - 12 x 18 inches, watercolor, 2010.jpg

Utterly long and I highly doubt you will reach that, ever. So no worries there.

On a aside note, I'd always opt to using descriptive subfolders. In your case, this could be something like:

http://... .com/2010/watercolor/illusions-and-existentialism-exhibit/the-imaginative-artwork-title_by_X-Y_12x18inches.jpg

Sources here, here and at the Google Image Publishing Guidelines Article.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2013-07-31)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。