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. Web Design
    4. For URLS, better to use folders or long file names?

    For URLS, better to use folders or long file names?

    Web Design
    4 2 1.1k
    • 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.
    • c2g
      c2g last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • KaneJamison
        KaneJamison last edited by

        You don't want to do a URL rewrite, you'll want to create a 301 redirect from the old URL to the new one.

        That said, I personally feel the subfolders look better as URLs in the examples that you gave. The subfolder looks less spammy to me because it's serving to organize information, rather than to stuff keywords, which is how the all-hyphens examples look to me. At this level, with a single subfolder and file names that aren't extremely long, it shouldn't make a huge difference in terms of SEO - in my opinion it's more about appearances to human visitors.

        In regards to making the PHP conversion easier, I assume you're referring to relative paths on PHP includes (e.g. ../includes/sidebar.php)? If that's the case I would just switch them to absolute rather than relative paths.

        c2g 1 Reply Last reply Reply Quote 3
        • c2g
          c2g @KaneJamison last edited by

          Thanks for your help. Not sure I understand what you mean by the URL rewrite. I'd either be rewriting the page to display as html with the slash or with the same exact name as the php file but with a html extension. If I rewrite using the slash, it will be the same URL, so no need for a 301. Not sure I follow you.

          I agree with everything you said about using subfolders, and ultimately that's what I'm going to do. The long URLs do look spammy to me, but after doing SEO in the legal field for a couple of years, I don't think I've seen a law firm site that isn't spammy altogether - but that's beside the point.

          As for relative vs. absolute paths - yes, your example is what I'm referring to. I've never understood using absolute in the code because how would I make edits in test? I do use it for home page links to help avoid the ".com" vs. "com/index.html" issue but I always find myself going out to the live site while clicking around in test without realizing it. Was wondering how people test that use absolute links.

          KaneJamison 1 Reply Last reply Reply Quote 0
          • KaneJamison
            KaneJamison @c2g last edited by

            Re: the rewrite, I may have misunderstood; I was suggesting that if you were planning to rewrite the URL of newfile.php to look like originalfile.html, then a redirect would have been easier for the overall management of the site. You can also enable .html files to use php includes: http://www.ntchosting.com/php/php-in-html.html

            Yeah - law firm SEO can be a bit dirty. Still, with an industry that requires high trust from clients, the spammy urls just aren't worth it to me - I think the conversion cost is higher than many people would estimate.

            Regarding using absolute in a test environment, it's rarely an issue for me on small biz sites so I paste the IP instead of the live domain on a page by page basis. Yoast wrote a good article last month regarding the troubles with relative url paths: http://yoast.com/relative-urls-issues/

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • We added hundreds of pages to our website & restructured the layout to include 3 additional locations within the sub-pages, same brand/domain name. How long could Google take to crawl/index the new pages and rank the keywords used within those pages?
              Roman-Delcarmen
              Roman-Delcarmen
              0
              2
              48

            • Using Multiple links/names for the same product?
              rjonesx. 0
              rjonesx. 0
              0
              4
              119

            • Moving servers which means moving ip address but using the same URL. Would it harm the website's SEO?
              tretanto
              tretanto
              0
              2
              124

            • Can Image File Names be Masked?
              LesleyPaone
              LesleyPaone
              0
              2
              94

            • Does Google count the domain name in its 115-character "ideal" URL length?
              MickEdwards
              MickEdwards
              1
              3
              2.8k

            • Is it better to redirect a url or set up a landing page for a new site?
              TomRayner
              TomRayner
              0
              2
              2.9k

            • After a website redesign, what is the impact and is it a good practice to use /v2/ naming convention?
              NicolasE
              NicolasE
              0
              5
              220

            • The use of foreign characters and capital letters in URL's?
              ASOS
              ASOS
              0
              2
              2.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