Before you simply name a file page1.html, image2.jpg, or some complicated string like a product number, think again. Filenames play a role in SEO, but a good file naming structure also makes it easier for your visitors to save and share links and navigate your website. From a developer’s point of view, having well named files makes it easier to find files and properly structure the hierarchy of the website.
To take advantage of SEO, stay organized, and make it easy for your visitors to enjoy your website, keep the following in mind when creating filenames:
Use keywords in your filenames. Filenames for individual pages become part of the URL and search engines may use the URL to determine relevance in their search results. If you’ve optimized content on a page, then it’s a no-brainer to use the title as the filename, with words separated by hyphens. The main blogging platforms do this automatically and even Google has recommended to use filenames based on keywords and separated by hyphens. (Hyphens make the URL easier to read by humans and search engines.)
You can also try to modify the filename from the title to include variations of a keyword; there may be a difference in how it’s displayed in search results. If you’d like to attract search traffic through image search, be sure to also use your keywords to name your image files, incl. the ALT tag, and the pages they’re displayed on. Image filenames don’t always become part of an URL, depending on your website’s structure, but can still greatly affect usability and SEO of a website.
Use actual words. When web users see links and URLs, they form an idea as to what the page is about and it becomes important to avoid naming files with random methods. For example, if web users are looking for a file about keywords, they are more likely to click on “keywords.html” than they are to click on a file named “200903127789.html”. A good filename is easy to understand and tells visitors what to expect from your webpage.
Avoid the use of special characters. Limit the characters in your filename to lowercase letters a to z, periods, underscores, hyphens and numbers 0 through 9. If you use any other characters, it could cause problems with loading the page. Simply using keywords and avoiding special characters is also beneficial to your SEO efforts. Search engines have been using a combination of URL, title, ALT tags, description and content to find and display results. So taking care to create a useful filenames for your pages and images is an easy way to improve that part of your website’s SEO.
Avoid spaces. For practical purposes using spaces in the filename of your webpage documents is not recommended and usually programs won’t allow it in the first place. Problems arise because the URL will typically be underlined when it is displayed, but it may not be clickable, because the space isn’t recognized as being a part of the URL. In addition, browsers usually require spaces to be encoded as “%20” or a plus symbol.
Start all of your filenames with lowercase letters. Although the operating system on your computer may not be case sensitive, your web server OS may see things differently. Your computer may interpret “Htmlfile.htm” and “htmlfile.htm” as the same file, whereas a web server would see two separate files. You may also run into trouble using CamelCase (upper and lower case) to name your files.
Shorter is better for filenames. Although you can theoretically use hundreds of characters in your URL, why do it? Keep your filenames to up to about fifty characters: it makes it easier to display them as links, easier to copy and paste (no need for URL shortening), and easier to remember. Having shorter URLs also helps when submitting your URLs to a directory, or aggregator; some will actually have a limit on how many characters your URL may have.
Bottom line: Make it easy for yourself, others working with your website and your visitors and use relevant lowercase keywords separated with hyphens in your pages’ and images’ filenames. Your website won’t only be easy to navigate, share and maintain, but it will also increase traffic to your website.