Skip to content
The Bits That Byte
  • About
February 10, 2018 / AngularJS

Preparing for an AngularJS AdSense and SEO Friendly Site

As I developed www.thepersonalfinancecenter.com with the joy of using AngularJS coupled with an Azure Mobile Services backend, the struggle was not with implementing a voting feature for social authority or providing identity management (thanks to Auth0), but rather how to ensure that AdSense would render properly and the site could be SEO compliant. Let’s address these separately.

AdSense and AngularJS
Since AngularJS normally acts as a Single Page Application, AdSense Ads could not be placed within Views. This created a challenge as after a few navigations on the site, the Ads would go away since AdSense saw it as one page going beyond the max of 3 Ads. I had to alter the design to have the Ads at the index.html layer housing the Views that would get routed to. For the visitor, the same Ads would stay constant through their visit, but this is a small price to pay versus no Ads!

SEO and AngularJS
While this can, and may end up, being several posts… one of the most critical aspects of SEO and AngularJS that I have found is to use a prerenderer to display static versions of your Views/pages. This was especially true in my case, since the majority of my content is retrieved via Mobile Web Services and displayed thru JavaScript. To be clear, this is much more of a JavaScript issue than a AngularJS challenge. If I had 1,000 hard coded views with plain HTML content I may not need a prerenderer.

In the end, I went with ajaxsnapshots.com/ since it had the clearest directions for integrating with IIS. Prerender.io is another strong option and integrates nicely with Node.js.

Conclusion
In short, if you are pursuing an AngularJS site with AdSense and SEO in mind, consider that AdSense may impact some of your design choices and that a good prerenderer is a must have with dynamic content.

Post navigation

Previous Post:

Microsoft removes MicrosoftAjax.js from SharePoint/Tells No One (Yet)

Next Post:

Sitecore 9 Update 1 SIF Prerequisites for a Scaled Environment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sitecore Technology MVP

Categories

  • AngularJS
  • Azure
  • CSS3
  • HTML5
  • Hyper-V
  • JavaScript
  • jQuery
  • OneDrive
  • PowerShell
  • Responsive Web Design
  • Search
  • SEO
  • SharePoint
  • Sitecore
  • SQL 2008 R2
  • SQL 2012
  • Tech Review
  • Tech Toy
  • Technical Resources
  • Uncategorized
  • Visual Studio
  • Web Content Management
  • Windows 8
  • Windows 8 App
  • Windows App
  • Windows Server 2008 R2
  • Workflow

Recent Posts

  • Sitecore Release Governance for Better Production Stability
  • 11 Tips for a More Stable Sitecore PaaS Environment
  • Sitecore Commerce 10.0.0 Bootstrap 404 Error and Other Changes
  • How to Run Cost Effective Sitecore Environments in Azure
  • Autofail: A Big Azure Autoscale Limitation and What To Do

Blogroll

  • Colins Sitecore Tech Blog
  • Sitecore Architecture – Grant's Sitecore Rants
April 2021
M T W T F S S
 1234
567891011
12131415161718
19202122232425
2627282930  
« Mar    
© 2021 thebitsthatbyte.com - Powered by SimplyNews