The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. How important is the file extension in the URL for images?

    How important is the file extension in the URL for images?

    Intermediate & Advanced SEO
    18 4 6.5k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Martijn_Scheijbeler
      Martijn_Scheijbeler @Guest last edited by

      Do you need a new keyboard?

      1 Reply Last reply Reply Quote 0
      • Martijn_Scheijbeler
        Martijn_Scheijbeler @Guest last edited by

        https://finance.yahoo.com/news/brutal-poll-shows-most-people-214647063.html Good luck!

        Guest 1 Reply Last reply Reply Quote 2
        • dsbud
          dsbud @Guest last edited by

          Again, you're mistaken. The Content-Type response header tells the browser what type of file the resource is (mime type). This is _completely different _from the file extension in URL paths.

          In fact, on the web all the file extensions are faked through the URL path. For example, this page's URL path is:

          https://moz.com/community/q/how-important-is-the-file-extension-in-the-url-for-images

          It's not

          https://moz.com/community/q/how-important-is-the-file-extension-in-the-url-for-images.**html**

          How does the browser know the the page is an html doc? Because of the Content-Type response header. The faked "extension" in the URL path, is unnecessary.

          You can view http response headers for any URL using this tool.

          1 Reply Last reply Reply Quote 3
          • Guest
            Guest @Martijn_Scheijbeler last edited by

            This post is deleted!
            Martijn_Scheijbeler 1 Reply Last reply Reply Quote -2
            • Martijn_Scheijbeler
              Martijn_Scheijbeler @Guest last edited by

              If you really did your research you would have noticed the header image is not using an extension.

              Guest 1 Reply Last reply Reply Quote 3
              • Guest
                Guest @Martijn_Scheijbeler last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote -4
                • willcritchlow
                  willcritchlow last edited by

                  @MarathonRunner - you are correct in your inline responses - it's totally valid to serve an image (or other filetype) without an extension, with its type identified by the Content-Type. Sorry that you've had a less-than-helpful experience here so far.

                  To answer your original questions:

                  1. From an SEO perspective, there is no need that I know of for your images to have a file extension - the content type should be fine
                  2. However - I have no reason to think that a filename in the Content-Disposition header will be recognised as a ranking signal - what you are describing is a rare use-case and I haven't seen any evidence that it would be recognised by the search engines as being the "real" filename

                  If you can't always refer to the image by its keyword-rich filename, then could you:

                  • Serve it as you propose (though without the Content-Disposition filename)
                  • Serve a rel="canonical" link to a keyword-rich filename (https://example.com/images/golden-retriever in your example)
                  • Also serve the image on that URL

                  This only helps if you are able to serve the image on the /images/golden-retriever path, but need to have it available at /images/123456 for inclusion in your own HTML templates.

                  I hope that helps.

                  dsbud 1 Reply Last reply Reply Quote 4
                  • willcritchlow
                    willcritchlow @Guest last edited by

                    Hi James. I've responded with what I believe is a correct answer to MarathonRunner's question. There are a few inaccuracies in your responses to this thread - as pointed out by others below - please can you target your future responses to areas where you are confident that you are correct and helpful? Many thanks.

                    1 Reply Last reply Reply Quote 2
                    • dsbud
                      dsbud @willcritchlow last edited by

                      @Will Thank you so much for this response. Very helpful.

                      "If you can't always refer to the image by its keyword-rich filename"...

                      If I'm already including the canonical link header on the image, and am able to serve from both /images/123456 and /images/golden-retriever (canonical), is there any benefit to referencing the canonical over the other in my image tags?

                      willcritchlow 1 Reply Last reply Reply Quote 1
                      • willcritchlow
                        willcritchlow @dsbud last edited by

                        In theory, there should be no difference - the canonical header should mean that Google treats the inclusion of /images/123456 as exactly the same as including /images/golden-retriever.

                        It is slightly messier so I think that if it was easy, I'd go down the route of only ever using the /golden-retriever version - but if that's difficult, this is theoretically the same so should be fine.

                        1 Reply Last reply Reply Quote 2
                        • 1 / 1
                        • First post
                          Last post
                        • How important is it to add hyphens between words in URL Permalink Structure?
                          malik12354
                          malik12354
                          0
                          4
                          114

                        • Does order of site: URLs denote anything of great importance?
                          Chris.Menke
                          Chris.Menke
                          0
                          4
                          54

                        • SEO Friendly Files Redirected From Images
                          0
                          2
                          44

                        • Will disallowing URL's in the robots.txt file stop those URL's being indexed by Google
                          Martijn_Scheijbeler
                          Martijn_Scheijbeler
                          0
                          11
                          1.6k

                        • Image URLs - best practice
                          Dr-Pete
                          Dr-Pete
                          1
                          3
                          1.2k

                        • Image URL Change Catastrophe
                          wantering
                          wantering
                          0
                          3
                          110

                        • How important is it to canonicalize mobile URLs to desktop URLs?
                          NakulGoyal
                          NakulGoyal
                          0
                          3
                          504

                        • URL Length or Exact Breadcrumb Navigation URL? What's More Important
                          grayloon
                          grayloon
                          0
                          5
                          3.8k

                        Get started with Moz Pro!

                        Unlock the power of advanced SEO tools and data-driven insights.

                        Start my free trial
                        Products
                        • Moz Pro
                        • Moz Local
                        • Moz API
                        • Moz Data
                        • STAT
                        • Product Updates
                        Moz Solutions
                        • SMB Solutions
                        • Agency Solutions
                        • Enterprise Solutions
                        • Digital Marketers
                        Free SEO Tools
                        • Domain Authority Checker
                        • Link Explorer
                        • Keyword Explorer
                        • Competitive Research
                        • Brand Authority Checker
                        • Local Citation Checker
                        • MozBar Extension
                        • MozCast
                        Resources
                        • Blog
                        • SEO Learning Center
                        • Help Hub
                        • Beginner's Guide to SEO
                        • How-to Guides
                        • Moz Academy
                        • API Docs
                        About Moz
                        • About
                        • Team
                        • Careers
                        • Contact
                        Why Moz
                        • Case Studies
                        • Testimonials
                        Get Involved
                        • Become an Affiliate
                        • MozCon
                        • Webinars
                        • Practical Marketer Series
                        • MozPod
                        Connect with us

                        Contact the Help team

                        Join our newsletter
                        Moz logo
                        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                        • Accessibility
                        • Terms of Use
                        • Privacy