Misc SEO research
Create .env file with the following content:
SPACECAT_API_KEY=
AHREFS_API_KEY=
Retrieve the values from Vault.
Run npm install to install dependencies.
npm run all <baseURL> [options]
This will create a CSV file for each assessment in the output folder with the results.
The results are summarized in a summary.csv file.
npm run sitemap <baseUrl>
npm run canonical <baseUrl> [options]
npm run broken-internal-links <baseUrl>
npm run broken-backlinks <baseUrl>
The backlinks will be checked on the development environment, if a devBaseURL is provided (with priority) or an
gitHubURL is set in SpaceCat for the site. If none of these are set, the backlinks will be checked on the
production environment, as inferred from the baseURL of the site in SpaceCat.
The following options are available for the assessments. They can be used either for running a single assessment or to run all assessments. If they are used to run all assessments, some options will only be used by their relevant assessments.
topBacklinks=<number>- Number of top backlinks (default 200), to run the audit fortopPages=<number>- Number of top pages (default 200), based on estimated organic traffic, to filter the backlinksonlyBacklinksInTopPages=<boolean>- Only check backlinks that are in the top pages (default true)devBaseURL=<devBaseURL>- Base URL of the development environment on which the backlinks should be checked.sitemap=<sitemapUrl>- Not used for now. Specify a specific sitemap location (default fetched from robots.txt or /sitemap.xml), especially useful for page in development as they are not listed yet in the robots.txt or sitemap_index.xml, to use instead of the top pages from Ahrefs