Menu Bar > Configuration > Spider > Crawl – Check the box to store Hreflang and Crawl (if you want to crawl and check they all 200)
To Filter on the Hreflang Tab
Click on the icon of the sliders on the top right Search window
You then get “Excel style” filtering options:
TL;DR – Use the hreflang Tab/Window – Use the drop down menu to show each report – Download – and check “indexable” URLs only –> none-indexable URLs don’t need a hreflang – Check each indexable URL has appropriate number of hreflang – Also check non-200 report
Find URLs without all of the relevant Hreflang Attributes:
Hreflang Window – “All” in Drop down menu – Filter out any parameter URLs using the filter in screenshot above – Does Not Contain (!~) – ?
Export to Excel
Filter so only shows “Indexable” URLs
Find any URLs without the relevant number of hreflangs – e.g. if you have 8 sites in different languages/regions – you’ll probably want most of your Indexable URLs to have 8 “occurrences” of hreflang
Check Non-200 Hreflang dropdown for any errors – Easiest way to export the specific hreflang URLs that don’t 200 – is to go to Reports > Hreflang > Non 200. Filter the spreadsheet to non-empty hreflang column D:
Unlinked Hreflang URLs – Perform a crawl Analysis to Check this
Missing Return Links
Use the search function near the top right (click the slider icon) – Filter to show only “indexable” URLs to find URLs that should have return links, that are missing them.
1) Select ‘Crawl’ and ‘Store’ Hreflang under ‘Config > Spider > Crawl’
2) To Crawl Hreflang In XML Sitemaps, Select ‘Crawl Linked XML Sitemaps’ Under ‘Config > Spider > Crawl’
3) Crawl The Website
4) View The Hreflang Tab
5) View the different Hreflang reports using the drop down menu
6) Perform a “crawl analysis” to see the 6th report
Reports
COntains hreflang – URLS that have the rel=”alternate” markup
Non-200 Hreflang URLs – URLs within the rel=”alternate” markup that don’t result in a 200 status code
Unlinked Hreflang URLS – Page sthat conain one or more hrelgang tag / URL that’s only linked to by a hreflang tag and not in the actual webpages
Missing Return Links – Hreflang should be recipricol.
Inconsistent Language & Region Return Links – This filter includes URLs with inconsistent language and regional return links to them. This is where a return link has a different language or regional value than the URL is referencing itself
Non Canonical Return Links – URLs with non canonical hreflang return links. Hreflang should only include canonical versions of URLs.
Noindex Return Links – Return links which have a ‘noindex’ meta tag. All pages within a set should be indexable,
Incorrect Language & Region Codes – This simply verifies the language (in ISO 639-1 format) and optional regional (in ISO 3166-1 Alpha 2 format) code values are valid
Missing Self Reference – URLs missing their own self referencing rel=”alternate” hreflang annotation. It was previously a requirement to have a self-referencing hreflang, but Google has updated their guidelines to say this is optional. It is however good practice and often easier to include a self referencing attribute.
Not Using Canonical – URLs not using the canonical URL on the page, in it’s own hreflang annotation. Hreflang should only include canonical versions of URLs.
Missing – URLs missing an hreflang attribute completely. These might be valid of course, if there aren’t multiple versions of a page.
Outside <head> – Pages with an hreflang link element that is outside of the head element in the HTML. The hreflang link element should be within the head element, or search engines will ignore it.
To bulk export details of source pages, that contain errors or issues for hreflang, use the ‘Reports > Hreflang’ options.
For example, the ‘Reports > Hreflang > Non-200 Hreflang URLs’ export,
Sometimes, the language and region values in a hreflang tag are not properly aligned with the page’s relevant languages or countries. This error can be trickier to handle as tools won’t be able to identify it, so a manual review will be needed to detect if the hreflang values are really showing the correct language and/or country for the page in question.
Remember, hreflang attributes require a language to be specified, but region is optionaland should only be used when necessary (for example, if you want to serve different pages to Spanish speakers in Mexico and Spanish speakers in Spain).
It’s critical to verify, before implementing anything, whether the site is language or country targeted (or if there’s a mix of approaches that you need to be aware of). The hreflang values will need to be generated according to this targeting.
Another scenario I’ve found is that, in some cases, the language (or country) code hasn’t been correctly implemented and always specifies the same language (or country) for each alternate URL. In this example from Audible, the home pages for France and Germany have been tagged as English language pages, even though they’re really in French and in German, respectively:
Irrelevant URLs
Similar to the previous example, sometimes the hreflang attributes are showing the right language and/or country values, but the URLs have not been correctly specified.
For example, in the case of Skype, you can see that the English language version URL is always specified instead of the relevant language URL for each case. (Similarly, the canonical tag is always showing the English URL instead of the relevant one, as in the case of the Spanish language page below).
Full URLs including Full Prefix e.g. has www. instead of https://www. in hreflang
There are also situations where URLs that are meant to have absolute paths are not including the “https://” or “https://” at the start, making them relative URLs which don’t point to the correct page, as can be seen in this example:
In some cases, the same page may contain information for people speaking different languages, so using hreflang tags alone may not be sufficient. Using schema.org markup can help search engines more accurately recognize parts of web pages. For example, inLanguage defines the language of the content or performance or used in an action in schemes such as Event, CreativeWork, BroadcastService and others.
There are multiple free online tools available for testing. My favorite is https://technicalseo.com/tools/hreflang/ Google Search Console depreciated their country-targeting feature September of 2022, however, third party crawl tools such as ScreamingFrog and Ryte.com can uncover site-wide language and regional targeting issues fairly well.
If you use a tool and get the message:
“Missing region-independant link for that language (en)”
It can mean, for example with the Technical SEO tool; that we need a generic URL for English speaking visitors, regardless of what region/country they come from.
In practice, it’s often recommended to have a ‘fallback’ or a default hreflang tag for each language. For English, this would be a tag with the language code “en” without a country code. This tag acts as a catch-all for English speakers in regions not specifically targeted by other tags (like en-GB or en-US).
For example, if your website has English pages specifically for the US and the UK, your hreflang tags might look something like this:
<link rel="alternate" href="http://example.com/en-gb" hreflang="en-gb" /> for English speakers in the UK
<link rel="alternate" href="http://example.com/en-us" hreflang="en-us" /> for English speakers in the US
To resolve the error, you would add a tag for a generic English version:
<link rel="alternate" href="http://example.com/en" hreflang="en" /> for English speakers in general, regardless of region
This setup ensures that search engines know which page to show to English-speaking users based on their location, and also have a default page to show to English speakers in locations not covered by your region-specific tags.
Can be added per URL or at a content component level.
Enables eligibility for various rich results (e.g., breadcrumbs, video results, FAQs).
Ensure logical heading hierarchy:
Headings in a headless CMS can be tricky due to content being decoupled from layout.
Heading hierarchy should reflect content organization.
Proper hierarchy is essential for web accessibility, aiding visually impaired users.
Summary:
Headless architecture empowers businesses to control their digital experience.
Initial technical setup for headless SEO can be challenging but offers greater control and integration.
Headless SEO provides vast possibilities for content-led experiences in ecommerce and content management for large international sites.
The true potential of headless SEO lies in the innovative ways digital teams will harness it in the future.
What is a headless CMS?
A CMS that separates content creation and management from its presentation.
Offers flexibility in delivering content to various devices and platforms.
Results in faster loading times and personalized experiences.
How headless CMS works in practice:
Removes the need for content changes to go through the development team.
Content marketers can publish and edit content using familiar CMS platforms.
Content is sent to the main website via API integration.
Benefits of headless CMS for organizations and SEO:
Scalability: Allows rapid content production across various platforms.
Improved Relationships: Separation fosters better collaboration between developers and SEOs.
SEO-friendly Features: Includes structured data support and customizable URLs.
Enhanced Security: Decouples presentation from backend, shielding sensitive systems.
Faster Load Speeds: Reduces complexity associated with traditional CMS architectures.
Google’s stance on headless CMS:
Google is neutral about the CMS choice.
John Mueller, Google’s Senior Search Analyst, stated Google doesn’t look for specific CMS signals in its algorithm.
Headless CMS neither positively nor negatively impacts SEO directly.
Best practices for SEO with headless CMS:
Ensure schema, metadata, and URL structure are consistent.
Validate content for mobile-friendliness.
Ensure content is included in fetch and render tests.
Update XML sitemap with new content.
Conclusion:
Adopting a headless CMS offers numerous benefits, including improved SEO performance.
Understanding its workings allows organizations to leverage its advantages for content production, collaboration, security, and speed.
Differences between headless SEO and traditional SEO:
Aim: Both aim to optimize content for search intent and high SERP ranking.
Omnichannel content delivery:
Traditional SEO has content delivery restrictions.
Headless SEO supports omnichannel content delivery for personalized experiences across devices.
Presentation layer freedom:
Traditional solutions limit innovative front-end experiences.
Headless SEO offers more creative freedom.
Platform dependence:
Traditional SEO locks users into a specific CMS platform.
Headless SEO offers freedom to choose tools and technologies.
Loading speed:
Traditional SEO can result in slow-loading websites.
Headless SEO optimizes loading speed and overall performance.
Pros and Cons of headless SEO:
Pros:
Enhances performance: Optimizes front-end code for speed and user experience.
Effective at Scale: Allows independent work of developers and content teams, beneficial for large websites.
Cons:
Technical skills required: Need for developers to build the front end and manage data fetching.
Requires knowledge of technical SEO: Users must handle aspects like website crawlability, speed, mobile responsiveness, redirects, and more, which were typically managed by traditional CMSs.
Pros and Cons of Traditional SEO
Pros:
No need for technical expertise due to traditional CMS.
Reduces decision-making time as tools and integrations are predefined.
Cons:
Slow website speeds due to simultaneous loading of frontend, backend, and content.
Limited omnichannel content delivery and digital experiences.
Comparison: Headless SEO vs. Traditional SEO
Headless SEO:
Supports omnichannel delivery.
Offers freedom in tool and technology choice.
Faster page load times.
Traditional SEO:
Limited content delivery channels.
Restricted to platform’s tools and integrations.
Slower page load times.
SEO Best Practices for Developers
Use semantic HTML for better content structure.
Ensure websites are mobile-friendly.
Optimize URLs for search with clear and relevant slugs.
Implement schema markup for enhanced search results.
Use server-side rendering for better page indexing. (look into “pre-rendering JS”
Include essential SEO meta tags.
Create XML sitemaps for improved website crawlability.
Optimize images for faster loading and better user experience.
Conclusion
Components like link building and pillar pages remain consistent regardless of CMS type.
Headless SEO demands technical skills and in-depth SEO knowledge.
Combining on-page, off-page, and technical SEO with the right tools ensures optimal search engine rankings.
Decision made to prioritize technical audit over content.
Technical Issues Identified and Dealt With
Irrelevant pages being crawled:
Over 4000 irrelevant pages crawled by Google.
Adjusted robots.txt and eliminated source of dynamically generated duplicate pages.
Result: Significant reduction in crawled but not indexed pages.
Duplicate content issues:
No meta tag control: Duplicated page titles and meta descriptions.
Solution: Added a plugin for easy editing of titles and descriptions.
Incorrectly implemented redirects: Soft 404s caused by meta refresh redirects.
Solution: Use 301 redirects instead of meta refresh redirects.
Missing redirects: No consistent URL format, leading to multiple versions of the same page.
Solution: Redirected non-trailing-slash, non-WWW URL formats to the correct format.
Result: Eliminated duplicate content issues and improved user experience.
Results
Collaborated with client’s dev team for implementation.
Changes made within two weeks in December.
Significant improvements observed:
Avg. weekly clicks increased by 92.5%.
Avg. weekly impressions increased by 2.3X.
Total keywords the domain ranked for increased by 4.2X.
SEMRush’s crawl comparison showed positive technical SEO metrics.
Emphasized that while growth is impressive, it will eventually level out.
Key Points about SEO in the JAMStack World with a Headless CMS
Living in the JAMStack world doesn’t alter primary SEO priorities.
Migrating from a Legacy CMS to a Headless CMS offers SEO benefits related to page performance, security, user experience, and multi-platform content delivery.
Unlike traditional CMSs, a headless CMS doesn’t offer plug-and-play simplicity for SEO factors.
The main difference between traditional and headless CMS is the ability to edit metadata instantly.
Traditional CMSs, like WordPress or Drupal, allow easy addition of page titles, descriptions, and other meta tags.
Headless CMSs, such as Hygraph, require different handling due to their cross-platform flexibility.
Standard best practices for on-page and off-page optimization remain unchanged: quality content, keyword optimization, interlinked content, domain authority, social sharing, and reputable backlinks.
SEO starts with the build and technical implementations, setting the foundation for content teams.
Technical SEO Best Practices for Headless CMS
Ease-of-crawlability and Page Structure:
Use Schema.org structured data markup to enrich HTML tags, making content more understandable to search engines.
Structured data aids in better indexing and understanding by search engine bots.
Example provided: JSON-LD structured data snippet by Google for contact information.
Structured data can help content appear as featured snippets in search results.
Meta Tags:
Essential for describing a page’s content to search engines.
Four key meta tags: Title tag, Meta Description, Meta Keywords, and Meta Robots. (not sure about meta keywords – think they went out with the arc)
In a headless CMS like Hygraph, meta tags should be added as String fields to content models, allowing content authors to add relevant metadata.
Proper use of a headless CMS with these practices can enhance SEO results.
React or Vue:
While they favor fast loading, there are SEO challenges.
Essential to add a component for metadata.
React Helmet can manage metadata in React apps.
React Router can enhance URL structure.
Use Isomorphic Javascript or Prerender for better SEO with client-side JavaScript.
Static Site Generators (SSGs):
Hugo, Jekyll, and Gatsby handle major SEO challenges.
They offer fast loading and manage metadata effectively.
Gatsby has plugins like React Helmet and Sitemap.
Content Delivery Network (CDN):
Distributes content across global servers.
Enhances website performance and user experience.
Image Optimization:
Optimize image size in headless CMS.
Use Lazy Loading for images and videos.
Prefer SVG or WebP formats for faster loading.
Add Open Graph metatags for images.
HTTPS:
Upgrade to HTTPS for security and user trust.
HTTPS websites load faster and rank better on Google.
Setting Foundations for Content Creators
URL Structure:
Use SEO-friendly URLs like example.com/page-title-with-keywords.
Include target keywords in URLs.
Ensure content has clear tags like H1, H2, etc.
Content Enrichment:
Optimize the use of images and media for better user experience and SEO.
Ensure assets are resized, compressed, and have relevant file names and alt-attributes.
Make pages easily shareable with OpenGraph and Twitter Card meta information.
Shareable pages improve backlinks, referral traffic, and brand awareness.
Final Takeaway
Proper technical foundation is crucial before content creation for better SEO.
Empower content teams with the right tools and practices.
Continuous engagement and regular audits are essential for maintaining and improving SEO.
While challenges exist with headless CMS, with the right practices, SEO improvement is achievable.
In case you’re wondering what “omnichannel” means:
What is an omnichannel content approach? An omnichannel content approach is simply all about bringing together all content channels in order to make them work parallelly to improve and customize the user’s experience.
TL;DR – Go to the “issues” reports – Bulk Report – Issues – All –> Export into a folder
View canonicals canonicalized reports
Some of the names of the reports can be confusing:
The “canonicals missing inlinks” report – is a list of the pages missing canonical URLs, and the inlinks to those pages
Canonicals Missing report – as you’d expect – shows you the pages without canonical URLs/tags
Canonicals Canonicalised – has pages with canonical to a different URL. So you might have example.com/help/contact – canonicalised to example.com/help – which may or may not be a problem.
Canonicals canonicalised inlinks – those pages with canonicals different to their own URL – the inlinks to those pages.
Check canonical with JS turned off (using Developer Chrome Extension) & check it remains the same
Check the View Source Code with and Without JS turned on – check canonical remains the same
Check canonical is not added using JS – this is not idea – more info here
Check for multiple canonical URLs using Screaming Frog and check visually in the view source code (JS rendering might be required to see all cononicals)
For paginated pages – check if you want each page indexed, that each different page has it’s own canonical URL
Check that faceted/filters on pages don’t change the canonical URL (generally you dont want them to)
On eCommerce sites, you might have parameter URLs that will go to a different canonical. For example using snowdog on Magento –
Use https://classyschema.org/Visualisation and import a URL – test using different URLs, especially for eCommerce websites – like homepage, about page, product page, category pages
Keyword gap – add competitors, see what they are ranking for, that you are not.
Filter by search volume of keywords and keyword difficulty.
Keyword gap is also good for Google ads insights. If a keyword is les than a few dollars per click, but is transactional and difficult to rank for organically, it might be worth bidding on in Google ads.
On Page SEO Checker
Gives you ideas including top pages to optimize.
suggests keywords to include on specific pages
suggests backlinks to go after
UX issues can be flagged here too – connect Google analytics. Check out pages with high bounce rate and short time on site.
Organic Traffic insights
Connect Google analytics and search console
Here, you can see pages with good and bad UX metrics and the keywords driving traffic
You can also see which keywords each page ranks for.
Use this report to decide if you should include other keywords on a given page – in the page’s existing content, or create new, more specific pages.
Domain overview
Key metrics, shown at the top include bounce rate and average time on site.
You can see your own, or competitors top pages in terms of traffic
See traffic sources- what percentage of traffic is direct, coming from social media etc. (you may have to click on “Traffic Analytics” in the side menu to see this)
You can compare domain metrics to another competitors, or your own website.
You can use Bulk Analysis to enter up to 100 domains to examine.
Keyword overview tool
Good for finding head/seed keywords.
Can view the Google SERPs and see what the competition for a given keyword is like
See what other keywords competitors are ranking for, on a given URL:
You can see questions related to/containing a given keyword
You can see international search volume for a keyword.
Related keywords are shown too – e.g. “football supplies” is related to “football equipment”
See SERP Features – what rich snippets etc are showing in the SERPs.
Keyword Magic tool
Start with a seed keyword
by default the report will give you broad match keywords.
Be sure to check out “related” match types (all keywords is also helpful)
For KW research – click on one of the main head KWs – and see what keywords your competitors rank for (clicking on the keyword takes you to the Keyword Overview tool – scroll down to SERP Analysis)
For example, if you enter “football equipment” (in the US) the tool gives lots of article ideas around “shoulder pads”, “football helmets”, “football cleats” etc.
Sometimes you get random ideas that you would never have thought of, like the searches around the dog called “pickle” when you look for topic ideas about Pickleball
There is loads more you can do with SEMRush, including position tracking. I’ll cover these additional tools in dedicated blog posts.
Keyword Manager
If you have a big list of keywords you want to get search volume for, I like to click “create a regular list” and then name the list and click “Add keywords” in the top right of the screen
Also handy if you’ve done keyword research for one country and need the search volumes for another country
You can view code in Chrome, by right-clicking on a webpage and clicking “view page source”
You can see the code of the page, but you can’t do much with it.
Instead, you can right click and choose “developer tools”
The elements panel is normally the default panel that you see:
As you hover over items in the Elements tab, it will highlight the relevant part of the webpage too.
You can right-click and choose “Inspect Element” and the Dev Tools window will open up, with the relevant piece of HTML code highlighted. For example, if you click the main header of a page, and choose “Inspect Element”, there’s a good chance you’ll be taken to the elements tab and have a “<h1>” highlighted.
You can change the text if you like, and the style – by typing and editing it in the styles panel on the right:
You can click the “+” symbol to add a new style (I couldn’t be arsed putting this screen snippet into Paint to used proper type-text):
You can right click > Inspect an element and click the delete key to get rid of a style
Click on the colour picker to get a eye-dropped tool and other colour-picker options to change colours used on the webpage:
Chrome Developer Tools
Click the mobile icon – to see a website previewed on a mobile phone – you can change the phone model with the drop down menu
Console Tab
You can type console.log javascript code. This allows you to see the output of JavaScript code.
Web developers log messages for 2 general reasons:
Making sure that code is executing in the right order.
Inspecting the values of variables at a certain moment in time.
Files and folders that have been loaded by the webpage, can be found in the Sources tab – e.g. type Jquery to see if a page is using jquery
It’s often used for debugging JavaScript:
“Top” – The top-level, such as top on the screenshot above, represents an HTML frame. You’ll find top on every page that you visit. top represents the main document frame. (more info here)
The second-level, such as developers.google.com on the screenshot above, represents an origin.
The third-level, fourth-level, and so on, represent directories and resources that were loaded from that origin. For example, on the screenshot above, the full path to the resource devsite-googler-button is developers.google.com/_static/19aa27122b/css/devsite-googler-button.
You can click individual files to view them in the preview pane in the middle:
Edit CSS and JavaScript
You can edit code and see the changes immediately on the webpage
CSS changes take effect immediately, no save needed. For JavaScript changes to take effect, press Command+S (Mac) or Control+S (Windows, Linux). DevTools doesn’t re-run a script, so the only JavaScript changes that take effect are those that you make inside of functions.
You can save snippets of code and run them on any page
Application Tab
See local storage – Open the local storage section – you can see, well the local storage:
I have no fucking idea what any of this stuff means at the time of writing. I think the {“url” etc is some type of JSON
The DOM – can be seen in the Elements Tab of Inspect-Element, allows you to:
Review various content elements includng meta title
Verify if Google can crawl it
A key thing to look for here is the differences between source-code and the contents of the elements tab.
Fucking JavaScript When auditing websites that have heavy JavaScript usage, content – such as page headers – sometimes appears fine in the HTML source code. But if injected via JavaScript, it may just show as a JS block in the Elements tab.
This can potentially be an issue, later verified through performing a site:example.com/page “content you’re looking for” advanced search and checking the cached version of the page.
The blog heading here, appears to be fine and stuff:
2. Check on mobile devices
Use the mobile icon on the top menu-bar, next to the “elements | Console” tab options, to see the page in different mobile devices
3. Site Speed
This can really be useful if you’ve blocked your staging website and 3rd party tools can’t access your URL
From the three-dot burger menu in the top right of the screen, you can access Network Conditions (found under More Tools).
you can throttle the network to slow 3G etc
Disable broswer cache
You can also select from a number of user agents ranging from Googlebot Smartphone through to various Microsoft Edge UAs, and Opera.
Once you have setup the setting for the network – go to the NetWork Tab, and see the page load
4. Render Blocking Resources
As mentioned previously, from the Network tab you can identify which JavaScript and CSS resources are being loaded before the DOM.
While this isn’t necessarily an issue on all websites, having resources load ahead of the DOM can potentially lead to it being blocked, which is one of the more common and resolvable site speed issues.
These can be identified by filtering for JS and CSS in the Network tab:
You can also see which elements, JS, CSS etc have a 200 status code, and which 404 or are blocked
In order to switch your user-agent in Chrome, use the Network Conditions tab in the console drawer.
Sometimes security measures on a website might stop Googlebot from crawling
Using the User-Ageny tool in dev tools, it’s possible to see if bots are getting blocked
Diagnosing Core Web Vitals in DevTools
Within the timings section, users can see flags for things like FCP (First Contentful Paint), and LCP (Largest Contentful Paint), one of our Core Web Vitals.
In hovering over the flag for LCP, we can actually see the piece of content flagged to be the largest contentful paint during the page load.
In order to help detect layout shift, use the Rendering tab in the console drawer:
Check the option for Layout Shift Regions, which will highlight areas of the page that undergo a layout shift as content is loaded. (when you go back to the performance tab and refresh)
Layout shifts will then be highlighted in blue as you interact with the page.
3. Double-Check Your HTTP Headers & Review Unused Code
After selecting a resource, the Headers sub-menu in the Network tab allows us to see a host of information regarding the selected file. (headers appears when you click and choose a file)
This includes all HTTP header information, like the Request URL, the Request Method, the Status Code, content-encoding, last-modified date, server, and so much more.
You can lean on this info to:
Verify GZip compression is enabled.
Double-check that cache-control is working as expected.
Verify we’re sending Googlebot and other user-agents the appropriate status code.
View the DOM in the Elements panel, to make sure Google can see it
Use this to review the content of any of the page’s elements (such as the title, meta description or page text) to verify that the desired relevant information is shown in each case, to make sure it’s accessible to Google.
When identifying these differences between the content shown in both, you can then take the appropriate steps to verify it’s being indexed correctly: reviewing the page cached version in Google, verifying if the text is being shown in Google’s results when searching for it, using the “Fetch as Googlebot” in Google Search Console and so on.
3. Find Unused JavaScript & CSS
To look for unused JavaScript & CSS open the Chrome Web Devtools, go to elements and press ctrl+shift+P and type coverage; and then select [Show Coverage]
After selecting show coverage you will see the below screen, now you have to click on reload button as you can see in the screenshot and that will finally lead you to the coverage report that will show you the JS & CSS files.
You can do a few nifty things, that seem a bit pointless at this point, like for example, calling and seeing how many paragraph <p> tags are on a page:
There are 5 paragraph tags, in the example shown above^
You can change the background colour of elements, like paragraphs:
Put the elements in a variable, and then change them with a loop^
Here i’ve changed the background colour of the paragraphs on vanilla-js.com:
Sources Tab & Basic Debugging
Right click on an element and select “inspect”
Go to the sources tab
You can click on lines of code to create a “breakpoint” so the code stops on that particular line of code
Breakpoints – pauses the code at a specific point
More info on setting up breakpoint to pause code in the Google documentation here
Line-of-code breakpoints
Use a line-of-code breakpoint when you know the exact region of code that you need to investigate. DevTools always pauses before this line of code is executed.
To set a line-of-code breakpoint in DevTools:
Click the Sources tab.
Open the file containing the line of code you want to break on.
Go to the line of code.
To the left of the line of code is the line number column. Click on it. A blue icon appears on top of the line number column.
You can view the local and global scope of the code
The “Filesystem” panel, tells you all the files that make up the current page:
Official Google Documentation for Chrome Dev Tools
Google has their own info and tutorial stuff on dev tools here.
Elements tab – we can see HTML representation of DOM – check page elements are in the DOM
Network tab – see what happens between the server and our browser. Reload page – and see each request from the server and the response You can see where time is spent. We can see each element/request – we can see how long it took including the time the server and download took. We can also see http/response headers – make sure there’s no X-robots tags if you want it indexed You can click on an element/request, then click on “initiator” and see what requested it:
Network tab can also be used to disable the cache, set network speed and the user agent.
Please note that Googlebot might not always work as expected, real Googlebot will respect robots.txt and some sites might do IP lookups to see if a request is really from a data centre.
Some SEO Checks using Developer Tools:
Dev Tools Checks
Inspect main elements – are they visible in the inspect window? e.g. right click and inspect the Headings – check <head> has meta title and desc
Check on mobile devices
Check all the elements result in a 200 – view the Network tab
Network Tab – Check with Googlebot
Console tab – refresh page – what issues are flagged?
Unused JS in the elements tab – coverage
Check for client rendered links using the code above , using the console tab
You can also use a “diff tool” to check the difference between a live DOM copied from dev tools and the view source code.
In the menu with the two arrows >> – you can click that and it has an option to analyze the DOM – which then gives you the number of elements and a few other bits
Just click the arrows, and then “Analyze DOM Size” and click the play icon