Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

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

    1. Home
    2. SEO Tactics
    3. Intermediate & Advanced SEO
    4. Where to put a page ID in a URL?

    Moz Q&A is closed.

    After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

    Where to put a page ID in a URL?

    Intermediate & Advanced SEO
    3
    5
    3803
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • komeksimas
      komeksimas last edited by

      Hello,

      My company is going to change URLs to example.com/category or example.com/product.

      When we will change the URLs to product or category pages somehow we have to check whether the requested page is from category table in DB or from products table (this gives much speed to page load time).

      So we have to choose how to make the different product and category pages.
      Programmers said that we need to insert id to URL.

      So the question is: Which is the better way to place an id to an URL?

      example.com/product-name?id=111

      example.com/product-name/111

      example.com/product_name-111

      Or maybe we should use some other punctuation mark to separate id from product name?

      p.s. I have read Dynamic URLs vs. static URLs by Google and it still didn't answered which is the best for all of the pages.

      Somehow others solve this problem by typing only the names to the URL, but could anyone tell what that technology should be?

      1 Reply Last reply Reply Quote 0
      • komeksimas
        komeksimas @ske11 last edited by

        As I have seen somewhere that underscore "_" unites the names and Google looks at it like one word with no spaces.

        Wouldn't it be bad for long product names?

        example.com/2010_chrysler_grand_voyager_2l would be the same as write example.com/2010chryslergrandvoyager2l ?

        1 Reply Last reply Reply Quote 0
        • komeksimas
          komeksimas @Highland last edited by

          Just trying to get the best out of everything 🙂

          In this case, doesn't product-name-111 is all keywords for a page? My product if my product page doesn't consist of 111 it would make a mess for Google.

          I can give one example that could messes up:
          example.com/cars-1963

          And 1963 isn't a year nor it's a model number of a car, it's the ID of a catalog.

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

            I would select a modified option #3 (modified in that I used all dashes)

            example.com/product-name-111

            I've seen this work. VBSEO (a vBulletin forum plugin that rewrites URLs) uses this format, where the ID is at the end of the URL. I've not seen any ill effects and this plugin has used this format for years.

            Don't get too hung up on the URL structure. It's like worrying about what color to paint your walls when your house has structural issues. URLs are window dressing. They help SEO, but only slightly.

            komeksimas 1 Reply Last reply Reply Quote 0
            • ske11
              ske11 last edited by

              I would use example.com/product_name-111

              I believe you need to do a mod re-write to get the URL to display the way you want it, but others will be better placed to advice you on this than I am.

              komeksimas 1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post

              Got a burning SEO question?

              Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


              Start my free trial


              Browse Questions

              Explore more categories

              • Moz Tools

                Chat with the community about the Moz tools.

              • SEO Tactics

                Discuss the SEO process with fellow marketers

              • Community

                Discuss industry events, jobs, and news!

              • Digital Marketing

                Chat about tactics outside of SEO

              • Research & Trends

                Dive into research and trends in the search industry.

              • Support

                Connect on product support and feature requests.

              • See all categories

              Related Questions

              • ParisChildress

                If a page ranks in the wrong country and is redirected, does that problem pass to the new page?

                Hi guys, I'm having a weird problem: A new multilingual site was launched about 2 months ago. It has correct hreflang tags and Geo targetting in GSC for every language version. We redirected some relevant pages (with good PA) from another website of our client's. It turned out that the pages were not ranking in the correct country markets (for example, the en-gb page ranking in the USA). The pages from our site seem to have the same problem. Do you think they inherited it due to the redirects? Is it possible that Google will sort things out over some time, given the fact that the new pages have correct hreflangs? Is there stuff we could do to help ranking in the correct country markets?

                Intermediate & Advanced SEO | | ParisChildress
                1
              • Alexcox6

                Category Page as Shopping Aggregator Page

                Hi, I have been reviewing the info from Google on structured data for products and started to ponder. 
                https://developers.google.com/search/docs/data-types/products Here is the scenario.
                You have a Category Page and it lists 8 products, each products shows an image, price and review rating. As the individual products pages are already marked up they display Rich Snippets in the serps. 
                I wonder how do we get the rich snippets for the category page. Now Google suggest a markup for shopping aggregator pages that lists a single product, along with information about different sellers offering that product but nothing for categories. My ponder is this, Can we use the shopping aggregator markup for category pages to achieve the coveted rich results (from and to price, average reviews)? Keen to hear from anyone who has had any thoughts on the matter or had already tried this.

                Intermediate & Advanced SEO | | Alexcox6
                0
              • Inevo

                Why does Google rank a product page rather than a category page?

                Hi, everybody In the Moz ranking tool for one of our client's (the client sells sport equipment) account, there is a trend where more and more of their landing pages are product pages instead of category pages. The optimal landing page for the term "sleeping bag" is of course the sleeping bag category page, but Google is sending them to a product page for a specific sleeping bag.. What could be the critical factors that makes the product page more relevant than the category page as the landing page?

                Intermediate & Advanced SEO | | Inevo
                0
              • Jonathan.Smith

                Should I include URLs that are 301'd or only include 200 status URLs in my sitemap.xml?

                I'm not sure if I should be including old URLs (content) that are being redirected (301) to new URLs (content) in my sitemap.xml. Does anyone know if it is best to include or leave out 301ed URLs in a xml sitemap?

                Intermediate & Advanced SEO | | Jonathan.Smith
                0
              • EcommerceSite

                Should pages with rel="canonical" be put in a sitemap?

                I am working on an ecommerce site and I am going to add different views to the category pages. The views will all have different urls so I would like to add the rel="canonical" tag to them. Should I still add these pages to the sitemap?

                Intermediate & Advanced SEO | | EcommerceSite
                0
              • Atlanta-SMO

                Does Google Read URL's if they include a # tag? Re: SEO Value of Clean Url's

                An ECWID rep stated in regards to an inquiry about how the ECWID url's are not customizable, that "an important thing is that it doesn't matter what these URLs look like, because search engines don't read anything after that # in URLs. " Example http://www.runningboards4less.com/general-motors#!/Classic-Pro-Series-Extruded-2/p/28043025/category=6593891 Basically all of this: #!/Classic-Pro-Series-Extruded-2/p/28043025/category=6593891 That is a snippet out of a conversation where ECWID said that dirty urls don't matter beyond a hashtag... Is that true? I haven't found any rule that Google or other search engines (Google is really the most important) don't index, read, or place value on the part of the url after a # tag.

                Intermediate & Advanced SEO | | Atlanta-SMO
                0
              • Jay328

                Weird 404 URL Problem - domain name being placed at end of urls

                Hey there. For some reason when doing crawl tests I'm finding pages with the domain name being tacked on the end and causing 404 errors. 
                For example:  http://domainname.com/page-name/http://domainname.com This is happening to all pages, posts and even category type 1. Site is in Wordpress
                2. Using Yoast SEO plugin Any suggestions? Thanks!

                Intermediate & Advanced SEO | | Jay328
                0
              • djlittman

                If I own a .com url and also have the same url with .net, .info, .org, will I want to point them to the .com IP address?

                I have a domain, for example, mydomain.com and I purchased mydomain.net, mydomain.info, and mydomain.org.  Should I point the host @ to the IP where the .com is hosted in wpengine? I am not doing anything with the .org, .info, .net domains.  I simply purchased them to prevent competitors from buying the domains.

                Intermediate & Advanced SEO | | djlittman
                0

              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
              Free SEO Tools
              • Domain Authority Checker
              • Link Explorer
              • Keyword Explorer
              • Competitive Research
              • Brand Authority 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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
              • Accessibility
              • Terms of Use
              • Privacy

              Looks like your connection to Moz was lost, please wait while we try to reconnect.