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
-
Domain Change
What is the average organic traffic loss one can expect after switching to a new domain? We went from .com to .org and are seeing 50% decline in organic traffic and 25% in Google news traffic. 301s were implemented from site.com/some-page to site.org/some-page and change site was completed in WMT. This traffic drop seems excessive...
Technical SEO | | SoulSurfer80 -
Changed all product titles, lost google schema markup in listings. Temporary?
We changed all of our product titles to be way shorter and less keyword stuffed last week. Short of dropping a few places in rank for most keywords (we assume temporarily) that all went fine. What we didn't expect was to loose all the schema data in our google listings from product pages. Price, and review stars are missing. Has anyone seen this before?
Technical SEO | | monkeyevil0 -
Changes to title and description not appearing in Google search...
www.heatwavemedia.com Search terms: san francisco video production, san francisco video production services In Google search site appears as "Heartwave Media: San Francisco Video Production Services" but I'm sure I've never used a colon in all my iterations of the title... Instead it reads "San Francisco Video Production Services | Heartwave Media" with the description "A San Francisco video production company specializing in creative corporate and commercial video services." But that's not coming up either... I'm on Wordpress and am using All in One SEO if that helps... Thoughts?
Technical SEO | | keeot0 -
Big on-page changes: all at once or little by little?
Hello, I have a website with bad urls (http://www.domain.com/site/page.php will become http://www.domain.com/page.php) and bad titles (keyword stuffing) and I have to fix all of them. Should I change the urls (and, yes, make the proper 301 redirects) and get crawled by the S.E., before I give a unique title for each page or viceversa? Or maybe shoud I do everything at once? What's the best practice to minimize the ranking drop and how long will it take to resume (and increase) the previous ranking?
Technical SEO | | DoMiSoL0 -
Web Master Tools: change of address
Hello, Hope you can help with an issue I'm having:www.brand-kw1-kw2.com (eg name of course) has moved to www.brand.comAll settings are done - like I did before when moving and setting up a new domain for an older site. (30q redirects - all versions are verified in WMT).However, when the change of adress features is "called out" I get the message: "We couldn't verify www.brand-kw1-kw2.com To submit a change of address, www.brand-kw1-kw2.com must be verified using the same method as brand-kw1-kw2.com. Add www.brand-kw1-kw2.com to your account and verify ownership, then try again." So dose it basically saying that I have to use the same method to verify both the www and non-www version ? Dose it make sense ? It sounds silly. Again, all version are verified and visibile in WMT already - I don't know how in the past those verifications were done but everything is looking good now. Is here a fix for this issue ? (I've moved several but this is the first issue I've encountered) Many thanks.
Technical SEO | | eyepaq0 -
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 -
Title Tag Wordpress
I need to know how can I personalize the title tag individually in my categories?
Technical SEO | | nafera20 -
How do I eliminate duplicate page titles?
Almost...I repeat almost all of my duplicate page titles show up as such because the page is being seen twice in the crawl. How do I prevent this? <colgroup><col width="336"> <col width="438"></colgroup>
Technical SEO | | ENSO
| www.ensoplastics.com/ContactUs/ContactUs.html | Contact ENSO Plastics |
| ensoplastics.com/ContactUs/ContactUs.html | Contact ENSO Plastics | This is what is from the CSV...there are many more just like this. How do I cut out all of these duplicate urls?0