Hello fellow Daniwebbers,

So I use grunt-filerev to cache bust any files that I make changes to, and what it does is change style.css to 8729.style.css every time I make a change to that file.
Now the thing is, I have it set to revision all images as well, so now my question is, does it hurt my seo when the image names have numbers in front or at the end of the file name?

thanks in advance!

On the surface, how you choose to name your external resources won't negatively affect your SEO. However, I do think it's a good general practice, especially for your logo and images you wish to have indexed in Google Images, to use friendly names. For example, our logo can be found at https://www.daniweb.com/images/logo.gif ... I think this goes, not just for external resources, but just it's an overall good SEO usability practice to have URIs that accurately describe the resource being fetched.

Something else to take into consideration is caching. I'm not sure how often you update your resources, or how dramatic those changes are, but sometimes you might move a TM symbol a few pixels over in a logo, for example, or make a very slight color change. Under those circumstances, you aren't necessarily going to want to cachebust the image for all your returning visitors, especially for a change they wouldn't notice. Save bandwidth whenever you can. You're also going to frustrate Google Images if an indexable resource keeps changing URIs. You might want to always be 301 redirecting old versions to the latest version in such a case.

All that being said, the preferred way of handling cachebusting is to tack on a query string to the end of the resource. Such as style.css?version=123. What you're then going to want to do is go into Google Webmaster Tools and, in the left sidebar, click on Crawl and then URL Parameters. If it doesn't already exist, add the parameter name you're using (such as 'version'), and in the dropdown asking if the parameter changes page content seen by the user, select No.

Google completely understands the concept of cachebusting, and, as you can see, even has a feature designed specifically for your exact use case. That is rare for webmasters! Take advantage of it!! With nearly all of SEO today revolving around what you can do to ensure that Google successfully understands your website, it's such a rare opportunity for the feeling of being assured that Google won't be confused by what you're trying to do.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.