undefined
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.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • 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. Technical SEO
  4. Dynamically changing a title with javascript

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.

Dynamically changing a title with javascript

Technical SEO
3
5
1.0k
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.
  • jfmonfette
    jfmonfette Subscriber last edited by Jan 17, 2013, 2:32 PM

    Hi, I asked our IT team to be able to write custom page titles in our CMS and they came up with a solution that writes the title dynamically with javascript.

    When I look on the page, I see the title in the browser, but when I look in the source code, I see the original page title.

    I am thinking that Google won't see the new javascript title, so it will not be indexed and have no impact on SEO.

    Am I right ?

    1 Reply Last reply Reply Quote 0
    • jfmonfette
      jfmonfette Subscriber @Cyrus-Shepard last edited by Feb 12, 2013, 12:23 PM Feb 12, 2013, 12:23 PM

      Thank you for your answer.

      I convinced our IT team to put build the title field in our CMS to be able to write our own titles.

      I was very skeptical of this client side javascript solution too. Now I can work with confidence.

      1 Reply Last reply Reply Quote 0
      • topic:timeago_earlier,25 days
      • Cyrus-Shepard
        Cyrus-Shepard last edited by Feb 12, 2013, 12:26 PM Jan 18, 2013, 11:10 PM

        I agree with Shane - this sounds like a bad idea all around. It's fine to generate the title tag dynamically, but it should generate on the backend or your CMS, before the page renders in a browser.

        Google does try to parse javascript for links and content, but it's inconsistent and I'm almost certain they would either see your non-scripted title, or get really confusing signals that could cause trouble later.

        The best solution may be to explain to your Devs that Google most likely wont parse the javascript, and see if they can come up with another solution.

        Best of luck.

        jfmonfette 1 Reply Last reply Feb 12, 2013, 12:23 PM Reply Quote 2
        • jfmonfette
          jfmonfette Subscriber @Jinx14678 last edited by Jan 17, 2013, 4:41 PM Jan 17, 2013, 4:41 PM

          Thank you for your answer.

          PHP is not an option since our website is running on an IIS server. I cannot fetch it as Googlebot yet because the solution is only in our development environment.

          1 Reply Last reply Reply Quote 0
          • Jinx14678
            Jinx14678 last edited by Feb 12, 2013, 12:26 PM Jan 17, 2013, 3:55 PM

            Probably not, but would run it through a Gbot emulator to make sure, as Google can parse some Jscript now - But not sure if it would in the section

            Is PhP not an option? as it is dynamic and renders server side and echoes can be used for page by page basis

            jfmonfette 1 Reply Last reply Jan 17, 2013, 4:41 PM Reply Quote 2
            • 1 / 1
            1 out of 5
            • First post
              1/5
              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

            • peteboyd

              Unsolved Capturing Source Dynamically for UTM Parameters

              technical seo google analytics utm parameters

              Does anyone have a tutorial on how to dynamically capture the referring source to be populated in UTM parameters for Google Analytics? We want to syndicate content and be able to see all of the websites that provided referral traffic for this specific objective. We want to set a specific utm_medium and utm_campaign but have the utm_source be dynamic and capture the referring website. If we set a permanent utm_source, it would appear the same for all incoming traffic. Thanks in advance!

              Technical SEO | Dec 28, 2022, 9:21 AM | peteboyd
              0
            • Jseddon92

              Domain prefix changed, will this impact SEO?

              Our web development team have changed our domain prefix from www to non www due to a server change. Our SSL certificate would not be recognised under www and would produce a substantial error message when visiting the secure parts of our website. To prevent issues with old links they have added a permanent 301 redirect from www. to non www. urls until our sitemap catches up. Would this impact our SEO efforts or would it have no impact as a redirect has been placed? Thanks

              Technical SEO | Apr 3, 2015, 10:52 AM | Jseddon92
              0
            • CRMI

              Duplicate Page Content and Titles from Weebly Blog

              Anyone familiar with Weebly that can offer some suggestions? I ran a crawl diagnostics on my site and have some high priority issues that appear to stem from Weebly Blog posts.  There are several of them and it appears that the post is being counted as "page content" on the main blog feed and then again when it is tagged to a category.  I hope this makes sense, I am new to SEO and this is really confusing. Thanks!

              Technical SEO | Mar 11, 2017, 9:08 AM | CRMI
              0
            • lvp1138

              Title tag not showing on google? Please Help!

              I've read the FAQs and searched the help center. My URL is: http://www.webygeeks.comI have updated title tags of my client's website 10-15 days ago, still the title on google is coming as the company name 😞 Why so??Description is correct but title is incorrect, can you please recommend me something guys?Also, i am wondering why the google cache is showing date of september 5 and we have changed the titles around 10 - 15 days before that http://webcache.googleusercontent.com/search?q=cache:P45GOiHRaIUJ:www.webygeeks.com/+&cd=1&hl=en&ct=clnk Really appreciate your suggestion.

              Technical SEO | Sep 11, 2013, 7:37 AM | lvp1138
              0
            • EcomLkwd

              Changing title tags, do we need 301 redirects

              I found many duplicate title tags and I'm in the process of changing it  Do I need 301 redirects in place when I switch it? I am only changing the title tag. Also, we are switching over to a new site very soon, I am worried that we might be using too many 301 redirect "hops" because we are doing a lot of optimization as well. (video from matt cutts describing 301 redirects and hops: http://www.youtube.com/watch?v=r1lVPrYoBkA. Does anyone have any experience in doing too many redirect hops that it affected your rankings? Any good ideas to avoid this?

              Technical SEO | Mar 12, 2013, 4:36 PM | EcomLkwd
              0
            • donationtown

              Alt and Title Attributes in Anchor Tags

              Does it hurt to use alt and title attributes inside an anchor tag?  Example: view my website article

              Technical SEO | Jun 25, 2011, 12:52 AM | donationtown
              0
            • Function5

              Why are apostrophes and other characters still showing as code in my titles?

              Hi, I have a WordPress-based site and overall everything is working well. However, I can't seem to figure out how to get apostrophes and other characters to display normally. Now, the problem isn't that they are displaying as code to normal visitors or up in the title bar, they are displaying as code to Google's bots as well as to SEOMOZ. Example: Normal visitor sees: About **** | **** - Metro Vancouver's IT & Web Experts Google and SEOMOZ see: About **** | **** - Metro Vancouver's IT & Web Experts I've played around with different ways of typing the title (not using character codes vs. using character codes) and nothing seems to work. Any help or explanation would be appreciated.

              Technical SEO | Jun 16, 2011, 11:16 AM | Function5
              0
            • PlusPort

              Changing CMS, are there SEO effects?

              We want to change our cms from typo3  to CMS made Simple. We have done this already for another site and it effected the rankings. Have you got experience with this? What factors are important for SEO to consider? Is it normal when you change from cms the rankings will drop?

              Technical SEO | Jan 9, 2012, 12:48 PM | PlusPort
              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
            • 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 - 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.