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. Technical SEO Issues
    4. Automate process for naming page titles?

    Automate process for naming page titles?

    Technical SEO Issues
    5 2 445
    • 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.
    • LindaSchumacher
      LindaSchumacher last edited by

      Hi everyone,

      I'm new to the Moz community, but really loving it. I'm hoping some of you more experienced experts may be able to answer what is probably a pretty basic question.

      I'm working for a non-profit client and I used the SEOMOZ tool to run a report on their site errors. I learned that the website has 5,432 duplicate page titles. They had their website redesigned last year before I started working with them and it appears that the developers didn't take into a account the need to provide unique page title names to each page.

      While it may make sense to go in to add custom page titles to a handful of the pages for the site, the vast majority of the pages are allocated to products (e-commerce). Is there a script that the developers could add that would automatically add page unique page titles based on say, the title of the product?

      Here are a few URLs to help you get a sense of what we're dealing with.

      homepage: www.creativityexplored.org

      example level two page: http://www.creativityexplored.org/artists/douglas-sheran

      example product page: http://www.creativityexplored.org/shop/original-art/prints/2776/profile-of-a-lady

      Thank you so much for any advice you can offer.

      Best,

      Linda

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

        It looks like the product pages are dynamically created based on the product id in the URL (e.g. 2776 from your product page example). This product page could be updated to dynamically produce a different title based on this same information.

        For example:

        $product = getProductByProductID(2776);

        $artist = getArtistByArtistID($product->artistID);

        <title><?php echo "$product->name by $artist->name"; ?></title>

        ?>

        Mind you, this is PHP code and you are using RESTful URLs so your site is likely written in Ruby - though I'm just guessing here.

        For Ruby, this is essentially pseudo-code as I am not a Ruby developer by day (though I did stay in a Holiday Inn Express last night), but I believe you are looking to do something like this in your controller:

        def product_page

        @product = Product.find(params[:id])

        @artist = Artist.find(@product.artistid)

        @page_title = "<%=@product.name%> by <%=@artist.name%>"

        end

        Then in your page template you can use:

        <title><%= @page_title %></title>

        Hope this helps and sorry if it is too technical/cryptic; but your developers should be able to do something like this pretty easily. It appears to already be underway to produce the rest of the page content. Now they just need to use it to populate the page title (and maybe the meta description - use part of the product description).

        1 Reply Last reply Reply Quote 2
        • LindaSchumacher
          LindaSchumacher last edited by

          Hi George,

          Thank you for your response. No, not too technical at all. I follow what you're saying. I'll pass this information on to my client and hopefully it's a relatively easy fix.

          If anyone else has any additional information about implementing the solution specifically for Ruby code, I would appreciate it.

          Thank you!

          Linda

          P.S. George, I'm curious, what is the connection between being a Ruby developer and staying at a Holiday Inn Express?

          GeorgeAndrews 1 Reply Last reply Reply Quote 0
          • GeorgeAndrews
            GeorgeAndrews @LindaSchumacher last edited by

            No problem, glad I could help.

            The Holiday Inn Express reference is in regards to a series of commercials they ran some time ago lol...

            Here's a Youtube video from one of them:

            http://www.youtube.com/watch?feature=endscreen&NR=1&v=l8Ah8WTL2i8

            It basically means that I don't normally code in Ruby, but I think I can still help you out ;).

            LindaSchumacher 1 Reply Last reply Reply Quote 1
            • LindaSchumacher
              LindaSchumacher @GeorgeAndrews last edited by

              Hey George. Thanks for cluing me into the Holiday Express reference. Very funny. And yes, you were able to help me out. 🙂

              Thank you!

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • How do I prevent duplicate page title errors from being generated by my multiple shop pages?
                effectdigital
                effectdigital
                0
                2
                103

              • Google Results Title vs My Page Title
                JoaoCJ
                JoaoCJ
                0
                6
                77

              • Duplicate page titles for blog snippets pages
                evolvingSEO
                evolvingSEO
                0
                2
                51

              • Titling Category Pages Like You Would a Blog Page?
                TheCraig
                TheCraig
                0
                3
                47

              • Problem with having the same Page title and Meta title?
                TommyTan
                TommyTan
                0
                6
                505

              • Page titles in browser not matching WP page title
                Doc_Sheldon
                Doc_Sheldon
                0
                6
                223

              • Having both <title>and <meta name="title"...> on a web page?</title>
                KaneJamison
                KaneJamison
                0
                2
                590

              • Duplicate Page Content and Title for product pages. Is there a way to fix it?
                RyanKent
                RyanKent
                0
                6
                935

              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