Click here to Skip to main content
15,120,478 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I host an Chinese language website on ixwebhosting, everything works fine but the file name I upload looks in messy code to search engines.

I upload "name.jpg"(name is Chinese language) to the server from webpage and it works exact "name.jpg" on webpage when I put it in
<img src="name.jpg" />
But when I check it from FTP directory, it looks like "balababa.jpg"(balababa is not English nor Chinese, God knows what it means).

And, if I upload "name.jpg" from FTP directly, it works fine in FTP directory. But the <img> tag can't get the path src="name.jpg". then I made a webpage to show all the files in the FTP directory, the "name.jpg" shows "balababa.jpg".

I'm afraid it's the encode problem, but it's not working when I add a <meta/> tag to indicate encoding to UTF-8.

What I concern is the image path will cause lots of 404 error to search engines.

What I can do?
Anyone helps

Most modern systems started to support Unicode in the names of file system object. It is relatively new achievement though. OK, let users of the system enjoy them. But let me advise you as a developer: use only the names in English and only in English, in ASCII character repertoire only. Believe me, doing anything else will only create some hassles. There are a lot of long-leaving obsolete legacy codes. They sneak into modern systems and spoil them. They are often remain untested due to pure cultural reasons: most test engineers are developers at heart and also follow the old tradition of using ASCII-based file names, so other names are tested only when Unicode support is tested specifically, in other words, it remains under-tested. I would also recommend to avoid blank spaces in file system object names, to stay far from troubles.

But of course, when you test your software where your user can create files, do just the opposite: test it with file names using as wide character repertoire as possible.

Please see:[^],[^],[^],[^],[^],[^],[^] :-).

Why do you think the filename "looks in messy code to search engines"? When the img tag works fine with the Chinese filename (i.e. in the html source it is shown correctly in Chinese, and the image is displayed when the page using that tag is shown in a browser), then I do not see a reason why it should be some useless characters from the point of view of a search engine.

You could also add an alt tag for the description of your image - search engines might use that.

Google offers "web master tools" which provide a lot of useful information about your web site. I do not know if Google's Chinese site or other Chinese search engines also offer such tools.
zhgfsh 11-Nov-12 20:38pm
Thank you.
Yeah, it right: "the html source it is shown correctly in Chinese, and the image is displayed when the page using that tag is shown in a browser".

Just becoz the image will be indexed by search engines, and the image path did NOT show correct when search engine crawl the image, it looks like "/Image/¹È¸èDisavow-links.gif" which can't be visited from browser, I think it will cause 404.

Anyway, thank you again, I will take SA suggestion, make the file name in English only.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900