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
-
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 -
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 | | Jseddon920 -
Crawl Diagnostics and Duplicate Page Title
SOMOZ crawl our web site and say we have no duplicate page title but Google Webmaster Tool says we have 641 duplicate page titles, Which one is right?
Technical SEO | | iskq0 -
Duplicate Titles on Wordpress blog pages
Hi, I have an issue where I am getting for duplicate page titles for pages that shouldn't exist. The issue is on the blog index page's (from 0 - 16) and involves the same set of attachment_id for each page, i.e. /blog/page/10/?attachment_id=minack /blog/page/10/?attachment_id=ponyrides /blog/page/11/?attachment_id=minack /blog/page/11/?attachment_id=ponyrides There are 6 attachment_id values (and they are not ID values either) which repeat for every page on the index now what I can't work out is where those 6 links are coming from as on the actual blog index page http://www.bosinver.co.uk/blog/page/10/ there are no links to it and the links just go to blog index page and it ignores the attachment_id value. There is no sitemap.xml file either which I thought might have contained the links. Thanks
Technical SEO | | leapSEO0 -
Changing Domain Name
Hi all, A client has just got their .edu domain and they want to change their current domain name (a .com) to this new .edu domain. The domain's CMS is Wordpress. Please correct me if I'm wrong, but basically I will need to create a new site (but they want to keep current design), move everything across to the new domain name, and 301 URL per URL? What about all the citations that the old URLs have gotten? The website is listed on Google listings/maps for some of their local keywords. Is there anyway to preserve this? Thank you all in advance.
Technical SEO | | EdwardDennis0 -
Registered Trademark in a Meta Title or Content
I know that registered trademarks don't hurt SEO, however if the trademark is used in the middle of a popular search phrase (see below) will it hurt the site's chanced of getting ranked for this term. Example: Funkybrand® Shoes PS I found one brand that used the trademark Acuvue® contact lenses. thanks!
Technical SEO | | yanaiguana1110 -
Understanding Duplicate Titles in Wordpress
I have duplicate title errors in Wordpress and I cannot pinpoint the problem. I have my blog set up so that the home page of the blog has the most recent posts. In my campaign report somehow the page directory is being found and I can't find any links on my blog to those pages. the errors are on pages that are like the following www.example.com/blog/page/13/ www.example.com/blog/page/14/ I am using Yoast and I thought I had it set up correctly. The other pages have the correct title and canonical tags, but he urls ending with page do not, but the page directory is duplicating the home page title. How or where can i fix this issue?
Technical SEO | | hfranz0 -
Duplicate Page Titles and Content
I have a site that has a lot of contact modules. So basically each section/page has a contact person and when you click the contact button it brings up a new window with form to submit and then ends with a thank you page. All of the contact and thank you pages are showing up as duplicate page titles and content. Is this something that needs to be fixed even if I am not using them to target keywords?
Technical SEO | | AlightAnalytics0