Skip to content
×

How Should Keywords Be Used in URLs and Image Attributes? Use Cases and Limitations

Keywords can be used in URLs and images, but their placement should reflect each field’s purpose: URL paths should be concise, readable, and convey the page’s topic; image alt text should describe the image without straying from what it shows just to include keywords. The recommendations discussed below also cover image names and product image titles. This does not mean every field should contain the same set of terms, nor does it guarantee higher rankings or sales.

URL Paths: Use the Primary Keyword to Make the Page’s Topic Clear

A Semrush article dated 2023 recommends including the primary keyword in a clean, readable URL structure. The point is not to cram every related term into the path, but to make the page’s subject clear. For example, the article uses “best-strength-training-exercises” as a sample path for an article about strength training, keeping the primary keyword consistent with the topic.

Product page URLs should reflect what is actually being sold. Another 2023 Semrush article uses women’s adidas running shoes as an example, placing the corresponding search term in the product page URL. This advice is specific to product pages and should not be applied indiscriminately to all articles. These recommendations focus on readable URLs that clearly convey the topic; they do not quantify any ranking gains from adding keywords.

Image Alt Text: Describe the Image First, Without Forcing in Keywords

Semrush’s 2019 article explicitly recommends that image alt text describe the image without forcing in unrelated keywords. Whether a page’s target keyword belongs in alt text depends first on whether it accurately describes that particular image, not merely on whether the page aims to rank for that term.

  • If a product image actually shows white women’s running shoes, the alt text can naturally include those characteristics. This is an example of wording, not a fixed template.
  • If a keyword includes characteristics that the image does not show and that cannot be confirmed, do not add them just to include the keyword.
  • Even when images on the same page show the same product, check that each description fits the individual image rather than pasting the same string of terms into every field.

Image Names and Titles: Both Can Include Keywords, but They Serve Different Purposes

The 2019 article also recommends using keywords in image names, suggesting terms that customers might search for when naming e-commerce images. However, this advice is separate from the requirement that alt text describe the image. The article does not establish that image names can replace alt text, nor does it compare their effects on rankings.

The 2023 product-page article also recommends including primary keywords in product image titles and alt text, and in product names where feasible. Secondary keywords can be used in product descriptions and attributes where appropriate. All of these recommendations depend on the terms matching the product. For example, whether to use terms related to white running shoes depends on what the page actually sells.

It is still unclear which field “image titles” refers to: the excerpt does not identify a specific field in the content management interface or explicitly name the HTML title attribute. The recommendation therefore cannot be treated as a rule for filling in every image attribute. The image traffic and sales mentioned in the 2019 article are also only potential benefits, not guaranteed results of adding keywords.

Keyword placement in URLs and image attributes: perspectives from across the web

Can alt text from high-ranking images be used as a reference?

It can serve as a reference for wording, but should not be copied directly. In 2019, Semrush recommended searching for related images and then checking their alt text in the source code of their webpages. It also emphasized that alt text should describe the image without forcing in unrelated keywords. Even if other images rank highly in search, their descriptions may not suit your own image.

How should primary and secondary keywords be selected for product pages?

Semrush’s recommendation for product pages is to select a primary keyword with transactional intent from search terms that match the actual product, along with suitable secondary keywords. The primary keyword can be placed in the product page URL and relevant fields; secondary keywords can be included in the product description and attributes where appropriate. This advice is specific to product pages and does not mean that everyone using a transactional search term will necessarily make a purchase.

How important are keywords in URLs among on-page SEO factors?

The survey from that time cannot, on its own, tell us how important URL keywords are today. An expert survey cited in a 2011 Stack Exchange post ranked URL keywords 10th among 24 on-page factors. The post also noted that outsiders cannot know for certain whether or how Google processes URLs. The survey reflects views at the time, not current ranking weights or an official rule.

References

  1. Do keyword-based filenames and URLs really matter?webmasters.stackexchange.com — Discusses: How important are keywords in URLs among on-page SEO factors?
  2. How to Choose Keywords for SEO + AI Search (5 Ways)www.semrush.com · 2023-03-24T12:03:00Z — Source used in the article above.
  3. Google NLP API Tool: Optimize Your Content to the Next Levelwww.semrush.com · 2019-09-13T07:00:00Z — Discusses: Can alt text from high-ranking images be used as a reference?
  4. Retail SEO Guide: How to Conquer the Competitionwww.semrush.com · 2023-12-29T11:59:00Z — Discusses: How should primary and secondary keywords be selected for product pages?
Keep the conversation going

Join the discussion 0 comments

What are you working through? Share a question or experience and let’s find the next step.

No comments yet. Start the conversation.

Share your thoughts

← Keep exploring
LET’S TALK

Start with your brand.

Tell me about your website and what you want to achieve.

WhatsApp tony@procrustes.info
Scan to chat on WhatsApp