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. On-Page / Site Optimization
    4. Search engine friendly URLs

    Search engine friendly URLs

    On-Page / Site Optimization
    6 4 530
    • 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.
    • limens
      limens last edited by

      I'm going to create some new content for my site, I'm trying to decide on the best search engine friendly format. Namely, is it ok to use a subdirectory or should I keep all content on root level?

      Is the SEO effect of either of these URLs superior to the other?

      domain.com/cooking/lasagna.php vs domain.com/lasagna.php

      1 Reply Last reply Reply Quote 0
      • cfguti
        cfguti last edited by

        If your URLs are sort, the best way is to use domain.com/cooking/lasagna.php, this is the best way to optimize for lasagna and target secondary keywords cooking related.

        Bye.

        limens 1 Reply Last reply Reply Quote 0
        • limens
          limens @cfguti last edited by

          this is what the length of URL would be in reality:

          www.domaindom.com/cooking-tasty-food/lasagna_with_cheese.php

          but if there is a good SEO reason, I could just put it on the root:

          www.domaindom.com/lasagna_with_cheese.php

          cfguti 1 Reply Last reply Reply Quote 0
          • cfguti
            cfguti @limens last edited by

            The second one is the best, because sort URLs are more relevant than long ones, but the best practices are http://www.seomoz.org/learn-seo/url

            Use - instead of _ to separate keywords 😉

            1 Reply Last reply Reply Quote 0
            • KeriMorgret
              KeriMorgret last edited by

              Hi Limens,

              It is certainly fine to use a subdirectory, and can really make sense to help organize your content. It's also helpful in your analytics if you want to see who went to the blog area of your site versus the product area of your site.

              It would help to know a little more about your site, but I would choose neither of the above. I'd actually go with something like domain.com/cooking/lasagna/. Note that I'm not including the .php. If you later switch to a different language, you won't have to redirect from php to asp or html, etc.

              I wouldn't stuff your subfolder in your URL with keywords like the tasty-food in your example below. It just makes your URL longer and look a little more spammy to the human eye.

              ebenthurston 1 Reply Last reply Reply Quote 2
              • ebenthurston
                ebenthurston @KeriMorgret last edited by

                I like this analysis and recommendation.

                The only other thing I would say (if it's a page) is drop the trailing slash on the recommended URL to this:
                domain.com/cooking/lasagna

                That makes it clear it's a page as opposed to a directory, and it also looks cleaner to the human eye.

                Here's some more complete discussion on the trailing slash topic:
                http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html 

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                • Why the url inspection is disabled in search console ?
                  supporthandle
                  supporthandle
                  0
                  4
                  123

                • Directories and Search Engine Site Submissions and Technorati Tags Important?
                  rflores
                  rflores
                  1
                  5
                  145

                • Do Search Engine Spiders Read Commented Out Content?
                  TakeshiYoung
                  TakeshiYoung
                  0
                  3
                  298

                • How to exclude URL filter searches in robots.txt
                  Everett
                  Everett
                  0
                  9
                  8.6k

                • Please give me advice on how to get this page back into search engines
                  ClaireH-184886
                  ClaireH-184886
                  0
                  7
                  112

                • Making a subdomain more search engine friendly?
                  MattAntonino
                  MattAntonino
                  0
                  2
                  265

                • Can PDFs on your website be picked up in search engines?
                  josh-riley
                  josh-riley
                  0
                  3
                  1.0k

                • How do I avoid cannibalization and point search engines to the correct page?
                  anthonydnelson
                  anthonydnelson
                  0
                  2
                  481

                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