Creating a Google Sitemap for your APEX Application
Google’s default crawling algorithm is likely to miss a lot of content within an APEX application. A sitemap will help.
2 min read
This is an update to a post I made at https://www.insum.ca/search-engine-optimization-with-apex-creating-a-google-sitemap/
The content of that blog post remains relevant, so I won't repeat it all here. I will simply recap a few updates specifically for APEX friendly URLs.
Why register a Google Sitemap?
Google’s default crawling algorithm is likely to miss a lot of content within an APEX application. The APEX URL format consists of the pattern something like this: https://[host]/[ords_mapping]/r/shema-alias/application-alias/app-page-alias?p10_id=1234
While this is better than it was prior to friendly URLs, that parameter at the end causes Google (and others) to not crawl the link. The solution is to give Google a sitemap with all of the pages you want Google to crawl.
Create a Sitemap in the Google Format
Following the instructions in my original blog post, along with the changes below, will give you a functional Google sitemap. To fully understand Google sitemaps, and get started on Search Engine Optimization, you should start at the link below.
While following the original blog post, you will make two changes.
The new package is located here:
Change to Resource Handler
The only other change is in the definition of the ORST REST Service resource handler.
begin --set the Content-Type header owa_util.mime_header ('application/xml', true); my_sitemap.page_xml(p_app_id => :MY_APP_ID); end;
owa_util.mime_header ('application/xml', true); sets the correct mime type.
That does it.