Node.js – Phantomjs – NGNIX – Angular.js
BUILDING SEO FRIENDLY SPA
AGENDA
SEO
SPA
AGENDA
Problem
Statement
Architecture
Technical
Insights
Demo
Tweaking The
Architecture
For
Production
SEO
SEO
What is
SEO?
Why
SEO?
Methods Crawlers
View
SEO - METHODS OF MAKING A SITE SEO
FRIENDLY
Optimize your title
tags
Create compelling meta
descriptions
Utilize keyword-rich headings
Add ALT tags to your images
Build internal links between pages
Update your site regularly
SEO
Crawler view of URL
• Pretty URL
• Ugly URL
SPA
SPA
What is
SPA?
Advantages
of SPA
SPA
Advantages of SPA
• Real-time communication
• Templating
• Controllers
• Routing
• Local storage
PROBLEM STATEMENT
PROBLEM STATEMENT
• Broken back button
• Missing Analytics
• Lack of error tracking.
• Crawling issues
• Indexing issues
• Potential cloaking issues Complex competitive environment
• Most of the application frameworks are not SEO friendly.
ARCHITECTURE
ARCHITECTURE
HOW DOES REDIRECTING BOTS WORK?
HOW DOES REDIRECTING BOTS WORK?
Crawler
HTML
SNAPSHOT
Web
Server
Headless
Browser
TECHNICAL INSIGHTS
TECHNICAL INSIGHTS
FETCH AS BOT
FETCH AS BOT
Google Webmaster Tool
• Index status
• Links to our site
• Crawl Error
• Crawl stats
• Sitemaps
• URL parameters
DEMO
DEMO
• Open CMD and start web server @ 9090
• Open CMD and start SEO server @ different port
• Launch “http://localhost:9090/”
• Push State
• Simulating request as crawler “http:/localhost:9090/?_escaped_fragment_=“
DEEP DIVE
• Indicate to the crawler that your site supports the AJAX crawling scheme
• Set up your server to handle requests for URLs that contain _escaped_fragment_
• Creating the HTML Snapshot
• Handle pages without hash fragments
• Updating your Sitemap to list the new AJAX URLs
• “Fetch as Googlebot"
TWEAKING THE ARCHITECTURE FOR
PRODUCTION
TWEAKING THE ARCHITECTURE FOR
PRODUCTION
Crawler
User
HTML
SNAPSHOT
NGINX
PHANTOM IN
SERVER MODE
HTML, CSS, JAVASCRIPT and API
QUESTION?
HTTP://IN.LINKEDIN.COM/IN/NEWNAVEEN15

Building SEO friendly SPA using PhantomJS, Node.js, Angular.js and HTML5

Editor's Notes

  • #22 Let us now look at our POC built