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. How do I get rid of duplicate page titles when using a php site?

    How do I get rid of duplicate page titles when using a php site?

    On-Page / Site Optimization
    3 3 459
    • 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.
    • curtisgibbsiii
      curtisgibbsiii last edited by

      Hi. I have an e-commerce site that sells a list of products. The list is divided into categories and then those categories for the various pages on the site. An example of a page title. would be given root/products.php?c=40   another page would be given root/products.php?c=41

      Is there a way to structure the site with SEO in mind?

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

        I know many e-commerce platforms have modifications for this. If by chance you're using Oscommerce or OscMax then you shouldn't have an issue finding an appropriate add-on.

        From my personal experience, while this is certainly an SEO related issue, the answers are best provided by the software or platform you're running. For example Oscommerce uses a URL re-write to deal with this and provides you the ability to modify the specific title and meta data.

        Hope this helps,

        Don

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

          The variable C probably calls the product up from the database. It's going to pull the product details (include the name of the product) into several variables, then post those variables into the HTML where necessary.

          If you can get into the PHP file where the product page HTML is generated, look for the same HTML element the product name is populated into in the source. Hopefully it's as simple as an H1 tag.

          There you should find the variable that will contain the product name - something like the following:

          If you find the above, you can simply grab that PHP code (everything inside the H1 tags) and paste it right into your <title>tag. </p> <p>Often it's that simple. </p> <p>But if you're using an eCommerce platform, as Don noted - Oscommerce or similar - you want to be careful about making custom tweaks to the PHP files, as this will create issues when you attempt to upgrade to a later version or otherwise patch your installation. In this case, you really want to find a plug-in or other modification that will be upgrade-friendly. </p></title>

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Can I robots.txt an entire site to get rid of Duplicate content?
            Andy.Drinkwater
            Andy.Drinkwater
            0
            6
            139

          • Duplicated page titles
            Andy.Drinkwater
            Andy.Drinkwater
            0
            2
            61

          • Duplicate Page Titles and Duplicate Content
            AlanWills
            AlanWills
            0
            7
            280

          • Index.php getting Duplicate page content.
            Unity
            Unity
            0
            3
            943

          • How do I avoid duplicate content and page title errors when using a single CMS for a website
            anthonytjm
            anthonytjm
            0
            6
            559

          • Duplicate page content & title for www.mydomain.com and www.mydomain.com/index.php?
            Carl287
            Carl287
            0
            3
            500

          • Should H1s be used in the logo? If they are and it is dynamic on each page to relate to the page content, is this detrimental to the site rather than having it in the page content?
            junioruf
            junioruf
            0
            7
            917

          • Crawl Diagnostics - Duplicate Content and Duplicate Page Title Errors
            JoelWolfgang
            JoelWolfgang
            0
            3
            809

          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