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
-
How to add titles to Pardot landing pages
I have 5 URLs that are "missing titles" however, all 5 are landing pages that were created in Pardot. how would I go about adding the missing title? Would I need to add it on our website platform or in Pardot?
Technical SEO | | cbriggs0 -
Javascript redirects harmful for SEO?
Hi Mozzers, A website deals with some javascript redirects. After some research, It came clear a normal 301 is the best option, but javascript redirects can be useful if you don't have access to a website' server. Does anyone have experience with javascript redirects? Can they be harmful in any point of SEO? I would love to hear your thoughts!
Technical SEO | | WeAreDigital_BE0 -
Google is not respecting the meta title
We're experiencing a peculiar situation with Google not respecting our meta <title>.</p> <p>As you can see in the first image (search result), the title <a href="http://open.iebschool.com/profesores/startups/">for the page</a> is a part of the content. This is relatevely normal for the description, but we never heard of Google doing this before.</p> <p>In the code, the <title> and meta description are correctly implemented.</p> <blockquote style="background-color: #f7f7f7; padding-top: 5px; margin-left: 0px; padding-left: 2px; padding-bottom: 5px; white-space: nowrap; overflow-y: auto; font-family: monospace; background-position: initial initial; background-repeat: initial initial;"> <p><meta name="description" content="Profesores, tutores, autores y docentes 2.0 de Open IEBS. Conoce su Biografía, experiencia, reputación, conexiones sociales y las valoraciones de alumnos."/><br /><title>Conoce los profesores, tutores, autores y docentes de Open IEBS.</title> In a further research, we discovered that the title which is using is an in anwith the following code (cleaned and simplified for the question): <hgroup> Pilar Soro
Technical SEO | | ofuente
0 Seguidor
Para poder seguir al Profesor, debes de registrarte aquí. Profesora y experta en redes sociales. Formadora de docentes, [...]
</hgroup> Note: we're correcting the code since this is quite messy, but it's the one we have now The point is that google has considered that this particular is more important than the title itself. This would make sense if we were looking for that name, but the search was simply "site:domain.com". Two things for which this is even more strange are the following: while all the /profesor/%category%/ has the same code, this only happens in some search results and not in all of them; why is it appearing in some pages, but respecting my title in others? the previous code is not the only one in the page, there are about 10 others and some are placed before and some are placed after; so, why this one and not the first or the last? What is more strange is why this article in particular and not any other of the 10 on the page since some of them are placed before and some of them are placed after. Provided this situation, we would like to know: is this a common situation? Is it happening to more people? why is it happening? Is it somehow related to , <hgroup>and ? why that piece of code and not any other article? and why is it only happening in some pages? more important, can it be corrected or can we take advantage of it somehow? Thank you in advance. Any light you can shed on this will be well received! AJ2CUSe.png?1?8232 </hgroup>0 -
Is Duplicate title made Sanbox?
I use Seomoz tool and discover that my webpage have 1000 duplicate title, my keyword with domain key 's position is 25, but i dont have any keyword ontop 100 of google. Is the Duplicate title effect in the key word position or SEO ? right?
Technical SEO | | magician0 -
Does SEO Reflect when We change the Host??
I would like to know, if i switch to host not Domain, Just Host which just change the internal IP, Will that Affect to My SEO? If YES then What is the procedure to safe our SEO before Move? Or what is Procedure after we Moved. Hope many people found this issues, and got the solution, I through Google Webmaster do through filter, but i am not sure about it. Thanks
Technical SEO | | Webranx0 -
Changing Domain Registrars have an affect on rankings?
So, I just wanted to move my domain from GoDaddy to NameCheap. I am still thinking about the move as I am not sure what affect it will have on my rankings. Has anyone here done it before? Did you see any drop in rankings? Also, while I was at it - I was thinking maybe I can add WhoisGuard too. I am not too paranoid about people getting my info from WhoIs, but does having a private Whois have an affect on ranking?
Technical SEO | | uzair0 -
Changing image path of the whole domain
Hi together, we are using a CDN for delivering static images. Due to some changes we want to change the path for images for the whole domain. like: images.example.com/old/var/test.jpg to images.example.com/new/var/test.jpg Does anyone know what could happend to SERPs? (old path will be available) Best regards Steffen
Technical SEO | | steffen_0 -
How will a domain change affect my rankings?
My company will undergo a domain change in the next few months. Other than implementing 301 redirects, what else can I do to help the search engines realize the site has moved? What kind of impact on rankings can I expect to see? Thanks in advance!
Technical SEO | | raylau0