Apply SEO best practices
Last updated
Was this helpful?
Last updated
Was this helpful?
This guide describes how you can implement SEO best practices in Appfarm. It is not a general guide to SEO. If you are looking for a grounding in SEO, see this .
For an app to be accessible by search engines and the broader public it must be available with .
The following topics are addressed in the guide:
Set the title tag for each view
Set a meta description for each view
Set a canonical URL for each view (only if you have a custom domain)
Optimize internal linking
Optimize images
Inform search engines
As Google is the biggest referrer of search traffic links are provided to Google search documentation for more information, where relevant.
Typically you’ll want to set a meta description and potentially a canonical URL per page (view). These tags need to be added into the app’s HTML. Use the event handler to trigger an action and use the to inject the tags. Example code is provided below. You can then use the event handler to update them.
By using On View Load to trigger updates to the HTML tags, you ensure that they are updated whether a user (or Google Crawler) arrives at a page directly or by navigating inside the app.
Restricting it to the root means that search engines (and users) will only see and share one URL for that content, focusing the search ranking on one primary URL.
Additionally, you should use descriptive file names for your images and include descriptive alt text.
Your site is small (Google classifies a site with 500 pages or fewer as small)
Your site is comprehensively linked internally
You don't have many media files (video, image) or news pages that you want to show in search results
To set unique content in the HTML tags for each view, use the event handler to trigger an action. You can use the same action for each view and use logic to insert the appropriate content for that view.
To set a page’s <title>
tag, update the Document Title.
To update the meta description and canonical URL tags, use the . Example code is provided below.
Further reading: ,
When you use the to navigate to the default view, select the Navigate to Root checkbox.
By navigating to the root when the default view is to be loaded, the URL path for that view will always be the app root. If you instead use the View property to select the view, the is added to the URL and this results in two different URLs displaying the same content.
If you have an image-heavy page, consider using the Lazy Load Image and Responsive Image properties on the the . These improve page performance which is a search ranking factor.
Further reading:
The easiest way to inform search engines about your app is ask them to crawl the URLs. For example, you can using Google Search Console.
If you need to verify ownership of the property in Google Search Console, you can select the HTML tag method and add the provided meta tag as a in the Production environment.
Another way to inform search engines is to submit a sitemap, but depending on the nature of your app you may not need a sitemap. In they state that you might not need a sitemap if:
If you determine that you require a sitemap, you can generate an XML sitemap and add it as a in the Production environment. You must then .