Dynamically changing a title with javascript
-
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 ?
-
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.
-
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.
-
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.
-
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
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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.
Related Questions
-
Changing from ocpatentlawyer.com to www.ocpatentlawyer.com
I want to change my web address from ocpatentlawyer.com to www.ocpatentlawyer.com. My understanding is that google treats these two web addresses as different web addresses. My blog is a pr 5 website. I don't want to make the switch and find out that google no longer ranks my pages and posts anymore.
Technical SEO | | jamesjd80 -
Duplicate title tags and meta description tags
According to GWT, it seems that some of the pages on my website have duplicate title and meta tags. The pages identified by Google are nothing but dynamic pages: http://www.mywebsite.com/page.php
Technical SEO | | sbrault74
http://www.mywebsite.com/page.php?param=1
http://www.mywebsite.com/page.php?param=2 The thing is that I do use the canonical link tag on all pages. Should I also use the "robots noindex" tag when the page is invoked using a GET parameter? Again sorry for my english. Thank you, Stephane1 -
Changing preferred domain
My company has an international website, and because of a technical issue visitors in one of our main countries cannot visits the "www" version of our site. Currently, the www version is our preferred domain - and the non www redirects to that page. To solve this problem, I was thinking of proposing the following and would greatly appreciate any feedback! (Note: If you answered my www vs. non www question, thanks - this is a follow up) 1. Set non www site as the preferred version 2. Redirect from www to non www 3. Contact our current links and ask them to change to without “www” 4. Change canonical URLs to without “www”
Technical SEO | | theLotter0 -
ECommerce Platform Change
I'm just entering the process of switching web developer companies, and I was wondering what process would be best for redirecting our old product (new and used cars) pages. Our current design leaves much to be desired seo wise (http://www.resslermotors.com/index.asp?cmd=detail&vin=1FTSX30F3XEC01446&stocknumber=123911&sg=ocor5h42d2yhkla&Make=Ford&parCertifiedFlag=&Model=&parVehTypeID=&p=6&page=1), and redirecting all of them seems like it would be pretty complicated. In addition to that, we currently have 35,000 pages. Is there a practical way to do redirects with this many pages?
Technical SEO | | ResslerMotors0 -
Changing url structure
We are an ecommerce site established in 2005 and currently have some great rankings. We are about to move away from our existing platform, actinic and move on to Magento. This will change all our url's. What are the steps we should be asking our web developers to follow in order to minimize the consequences of moving? Thank you.
Technical SEO | | LadyApollo0 -
How to resolve duplicate content and title errors?
Hello, I'm new to this resource and SEO. I have taken the time to read other posts but am not entirely sure about the best way to resolve the issues I am experiencing and so am hoping for a helpful hand. My site diagnostics advise me that most of my errors relate to duplicate content and duplicate page titles. Most of these errors seem to relate to our ecommerce product pages. A little about us first, we manufacture and retail over the internet our own line of unique products which can only be purchased through our website. So it’s not so important to make our product pages stand out from competitors. An example of one of our product pages can be found here: http://www.nabru.co.uk/product/Sui+2X2+Corner+Sofa In terms of SEO we are focusing on improving the rankings of our category pages which compete much more with our competitors, but would also like our product pages to be found via a google search for those potential customers that are at the late stage of a buying cycle. So my question: Whilst it would be good to add more content to the product pages, user reviews, individual product descriptions etc (and have good intentions to do this over time, which unfortunately is limited) is there an easy way to fix the duplicate content issues, ensure our products can be found and ensure that the main focus is on our category pages? Many thanks.
Technical SEO | | jannkuzel0 -
Hiding text with Javascript and a more button
I am considering putting a block of text on may pages, that initially appears as a snippet with a 'show more' button that expands to show the whole lot. Question: If the search engines can see the whole lot, but the visitor only sees the snippet until they click 'show more' then is this cloaking? Is it a really bad idea? Or can I get away with it because I am not being deceptive just improving the design? Help!
Technical SEO | | mascotmike0 -
Sneaky Page Title?
Hi Mozzers, I am a newbie, for sure. But I have been able to figure out how to help my customer very well; with the help of SEOMOZ of course. Here is the question: My customer (ZR) has a competitor and they use the phrase ZR.com in the title of one of their high ranked pages. Please see the enclosed graphic for the complete story. I would love to know if it is even legal (a pro would know) please see enclosed JPG... Thanks a bunch! OJ0ZL.jpg
Technical SEO | | Giggy0