Google text-only vs rendered (index and ranking)
-
Hello, can someone please help answer a question about missing elements from Google's text-only cached version.
When using JavaScript to display an element which is initially styled with display:none, does Google index (and most importantly properly rank) the elements contents?Using Google's "cache:" prefix followed by our pages url we can see the rendered cached page.
The contents of the element in question are viewable and you can read the information inside.
However, if you click the "Text-only version" link on the top-right of Google’s cached page, the element is missing and cannot be seen.
The reason for this is because the element is initially styled with display:none and then JavaScript is used to display the text once some logic is applied.
Doing a long-tail Google search for a few sentences from inside the element does find the page in the results, but I am not certain that is it being cached and ranked optimally... would updating the logic so that all the contents are not made visible by JavaScript improve our ranking or can we assume that since Google does return the page in its results that everything is proper?
Thank you!
-
Hi,
Google is quite clever at distinguishing what your code does and since you can search for the sentence inside the hidden element and find the page, it is being indexed.
What you’re seeing in the Google cache is what a user without javascript enabled would see, so it’s personal choice if you think this is a problem for your site or not. But if Google thinks your site has poor usability for non-js browsers your rankings may be impacted.
There are a few things you could do if you wanted to fix this:
1. Remove the hide class from your code and have javascript add this class so only users with javascript enabled will have the content hidden from them, leaving it visible to crawlers and in your text-only cache.
2. Google recommends using
<noscript>tags to display content that is dynamically added by javascript. I know your js is not adding the content, just displaying it, but it will have the same effect in the text-only cache – your content will be visible both with and without javascript enabled.</p> <p>Hope this helps,</p> <p>Tom</p> <p> </p> <p> </p></noscript>
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 optimise non-homepage to beat homepage in rankings? Are we on right path?
Hi all, We have a page with "keyword" in slug like "website.com/keyword" where our homepage is "website.com". This "keyword" difficulty is very high, so every minor factor contributing here and we have noticed competitors' pages with "keyword" in URL ranking. Then we also planned to rank this page "website.com/keyword" and interlinked high, so it'll be favoured by Google which didn't happen. So may be we should reduce the interlinking to homepage and optimise this keyword page more to rank for this keyword. Still I doubt the chances of ranking this page is difficult and need much more. How to make this page ranked replacing homepage? If there are no options for this, we are planning to redirect our homepage to this page; so Google will slowly adopt it. Suggestions please. Thank you.
Web Design | | vtmoz0 -
How does Google's AJAX Announcement Impact the likes of AngularJS?
Google's announcement last month about depreciating their AJAX crawl directive and Distilled's recent article have got me thinking a lot about how this change impacts frameworks like AngularJS. For those of you that use or are considering using frameworks like AngularJS, does this change impact you? Has it changed your mind about services like Prerender etc? All discussions relating to AJAX crawling welcome. Some resources to get started: https://prerender.io/js-seo/angularjs-seo-get-your-site-indexed-and-to-the-top-of-the-search-results/ https://www.distilled.net/resources/prerender-and-you-a-case-study-in-ajax-crawlability/
Web Design | | ecommercebc1 -
Best Approach to Rank For Multiple Locations With Similar Targeted Keywords
I'm trying to determine the best way to set up a website to rank for a similar set of keyword phrases in three different cities. The keyword phrases I want to rank for are all pretty much the same with the only difference being the city associated with the keyword phrase. For example, "Austin water restoration" vs "San Antonio water restoration" vs "Houston water restoration". Each city needs about 7 or 8 pages of unique content to accurately target the group of keywords I'm trying to rank for. My initial thought was to write up unique content for each city and have each city act a site within the main site. For example, the main navigation for xyz.com/austin would be Austin specific, so when you land on xyz.com/austin and go to Services - Water Restoration, it would be all Austin specific content. The same would be true for San Antonio and Houston. The only problem with this approach is that I have to build up the page authority for a lot of different pages. It would be much easier to build up the page authority for one Water Restoration page and just insert a little "Areas we serve" on the page that includes "Austin, San Antonio, and Houston" and maybe work the coverage area in again at the bottom of the page somewhere. However, it would be much more difficult to work "Austin, San Antonio, and Houston" into the title tags and H1s though, and I couldn't logically work the cities into the content as much either. That would be a downside to this approach. Any thoughts on this? Wondering how large companies with hundreds of locations typically approach this? I'd really appreciate your input.
Web Design | | shaycw0 -
Will changing content managment systems affect rankings?
We're considering changing our content management system. This would probably change our url structure (keep root domain name, but specific product pages and what not would have different full urls). Will our rankings be affected if we use different urls for current pages? I know we can do 401 redirects, but anything else I should consider? Thanks, Dan
Web Design | | dcostigan0 -
Does a loading homepage animation effect rankings?
Our website ( panphoenix dot com) has a Javascript animation when you load it for the first time which takes just over 2 seconds to load. Does having this animation effect rankings negatively? Would appreciate your thoughts!Thanks Rob
Web Design | | roberthseo0 -
How to change the entire contents and design in my site without getting troubles with google?
Hello everyone This is my first post over here. In the next few weeks we going to change the entire content and design in our site. The site has 240 pages with poor contents and design. Except 301 redirects for all the old url’s I wanted to consult with you what is the right way to do it without harm my organic traffic that come from google? How google refers to this kind of changes? Which steps should I need to take to do it properly? Hope to get your help in the issue. Tahnks in advance.
Web Design | | JonsonSwartz0 -
Duplicate home page /index.asp /index.php etc
We recently moved www.devoted2vntage.co.uk to shopify but seem to have multiple home page variants still in google index. I am concerned that these will be causing duplicate content. I have redirected the offending URLs below to www.devoted2vintage.co.uk/ and have set up a canonical URL but need an expect to tell me if I have taken the current steps and if not, exactly what I need to do. www.devoted2vintage.co.uk/index.php www.devoted2vintage.co.uk/index.htm www.devoted2vintage.co.uk/index.html www.devoted2vintage.co.uk/index.shtml www.devoted2vintage.co.uk/index.aspx www.devoted2vintage.co.uk/index.cfm www.devoted2vintage.co.uk/index.pl www.devoted2vintage.co.uk/index.asp
Web Design | | devoted2vintage0 -
3 Products & 50 Options each, How does Google handle product variant or options?
We are selling furnace filter and we might move our existing store host by BigCommerce to Americommerce or Corecommerce. Before moving the store, I have a questions about our online store structure. We are selling 3 different furnace filters, GOLD, SILVER and BRONZE Series. Each furnace filter come in about 50 different sizes, for a total of about 150 different products. The way our store is setup now, it is 150 different product, 150 different URL, 150 different page name... The way it is setup now, might look like duplicate content. All the product page are the same, all the pictures are the same, the only thing that change, is the furnace filter size in the product description. Look at those pages for example: http://www.furnacefilterscanada.com/20x20x4-Furnace-Filters/ http://www.furnacefilterscanada.com/categories/2-Inches-Thick-Filters/10x20x2-inches/ http://www.furnacefilterscanada.com/categories/2-Inches-Thick-Filters/16x25x2-inches/ Would it be better to only have 3 products and 50 variables or size options? What would be the best structure in a SEO point of view? One thing we have to keep in mind, when searching for a furnace filter, shooper will use keywords like: 16x25x4 furnace filter filter 20x20x1 air furnace filter 10x20x1 furnace filter 24x24x4 canada furnace filter Most of the Google search will included the filter size_._ How does Google handle product variant or options_?_ If I have 3 products, I will have only 3 URL and 3 different page name. I know for the shoppers, 3 products with sizes options might provide a better experience, but what about Google ranking the products? What is opinion the best online store structure in our case? Thank you for your help, preciouse time and support. BigBlaze www.furnacefilterscanada.com/
Web Design | | BigBlaze2050