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
-
301 redirect from dynamic url to static page
Hi, i want to redirect from this old link http://www.g-store.gr/product_info.php?products_id=1735/ to this one https://www.g-store.gr/golf-toualetas.html I have done several attempts but with no result. I anyone can help i will appreciate. My website runs in an Apache server with cpanel. Thank you
Technical SEO | | alstam0 -
Can OG titles be used as a substitute for Meta titles
We use og (open graph) titles in lieu of meta titles. Is there any downside to using just one. Should we be using both og and meta titles on our page. Appreciate any insight. Himanshu
Technical SEO | | patilhimanshu0 -
Google Not Recognizing Domain Name Change
It has been over a month since we have switch https://www.iwdextensions.com
Technical SEO | | lsujoe
to
https://www.iwdagency.com/extensions/ Yet Google is still ranking the old domain name in their search results. https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=iwd extensions Are we doing something wrong or does it take Google more than a month to update their results for this type of change? We have 301 redirected the old url to the new one and submitted a domain name change in GWT. Let me know your thoughts!0 -
Title Missing or Empty
Hello, I get a 'Title Missing or Empty' for the following page on our website: http://www.niyati.sg/print-design/57/annual-report-design This error is seen while checking through other tools like Screaming Frog also. Any idea what the issue may be? The page is generated through a custom CMS, so the title and meta descriptions are created the same way as the other portfolio pages, none of which shows any errors. Thanks in advance!
Technical SEO | | RameshNair
Ramesh0 -
Google Places Page Changes
We had a client(dentist) hire another marketing firm(without our knowledge) and due to some Google page changes they made, their website lost a #1 ranking, was disassociated with the places page and was placed at result #10 below all the local results. We quickly made some changes and were able to bring them up to #2 within a few days and restore their Google page after about a week, but the tracking/forwarding phone number the marketing company was using shows up on the page despite attempts to contact Google through updating the business in places management as well as submit the phone number as incorrect while providing the correct phone number. And because the client fired that marketing company, the phone number will no longer be active in a few days. Of course this is very important for a dental office. Has anyone else had problems with the speed and updating Google Places/Plus pages for businesses? What's the most efficient way to make changes like this?
Technical SEO | | tvinson0 -
Duplicate Title Tags
Hi, Are these 2 title tags different enough? Notice only the 's' on Templates is switched <colgroup><col width="559"></colgroup>
Technical SEO | | Studio33
| Invoice Templates | Invoice Template | invoicing Software | Invoice Software Invoice Template | Invoice Templates | invoicing Software | Invoice Software | Thanks0 -
Newbie Duplicate Title Question
We recently update our website with DNN 6. Once the upgrade was done, I kept recieving log in links on my duplicate title and duplicate content error reports. Is anyone familiar with how to stop these links from showing up? Example of link: http://www.faisongroup.com/Login/tabid/750/Default.aspx?returnurl=%2F Any help would be greatly appreciated! Thank you!
Technical SEO | | VeronicaCFowler0 -
Title and description tags
Hi everyone! What is the maximum length a title tag should be and what range should a seo description be for best practice?
Technical SEO | | PeterM220