1

I'm implementing a caching plugin to my app, and it adds an hashbang string to the names of the static files.

I would like to know your opinion regarding it. Adding an hash to static files like JS or CSS doesn't hurt the SEO, but regarding images I'm in doubt. My worry is if hash hurts SEO ranking of the images.

An example for the code:

<img src="aWhiteCat.e25500fd.jpg" alt="" />

After all I would love to get encountered by Google Images.

  • How does your caching plugin work? Hashes are never seen by the server, so they have no effect on files returned. – DisgruntledGoat Jun 29 '16 at 22:45
  • It's a Gulp.js plugin that rewrite all the files and change there real name and build a new folder with all the app. The end result is visible to crawlers like google – neoswf Jun 30 '16 at 0:08
  • Do you have a live working example? – DisgruntledGoat Jun 30 '16 at 9:22
  • Hey @DisgruntledGoat. Its like that <img src="aWhiteCat.e25500fd.jpg" />. Sorry for not putting it in the OP. Will add now. – neoswf Jun 30 '16 at 13:35
  • What I meant is, do you have a link to a page where you are using this plugin? Your code doesn't have a "hashbang" in it. – DisgruntledGoat Jul 1 '16 at 0:36
1

Thanks for clarifying your set-up. That is in fact not a "hashbang" - hashbang is the name given to URLs that use #! followed by some variables or state. Google actually had algorithms to process those URLs (see the Google Blog) however, that is now deprecated.

For your set-up, I'd call it a "hash key", as usually the e25500fd is based on the contents of the file (aka a "file hash").

On its own, having the "random letters" in the URL isn't a big problem as long as you have the descriptive part (aWhiteCat). However, most likely the URLs will change every time the image changes, which means you will end up with several duplicate URLs that resolve to the same image - aWhiteCat.e25500fd.jpg, aWhiteCat.b5a9df8.jpg etc.

That means it will be harder for images to rank in Google Image Search. One image will be seen and ranked in image search, but when the image changes all references to that image will disappear from your site and the new one will appear, meaning Google has to start all over again.

If the images will not change often (or at all) then it shouldn't be an issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.