Skip to main content

JavaScript Redirects

Pages which, when rendered, were redirected to another URL by JavaScript.

Priority: Low

Impact: Negative

What issues it may cause

These redirects require the page to be rendered by search engines which may take longer to be processed than a server-side redirect. Google recommends using server-side redirects instead of JavaScript redirects if possible.

If the search engines are having issues rendering the pages, the redirect may not be seen at all.

How do you fix it

Configure server-side redirects instead of JavaScript redirects.

What is the positive impact

Search engines will process the redirects more quickly.

How to fetch the data for this report template

You will need to run a crawl for report template to generate report. When report has been generated and you have crawl id you can fetch data for the report using the following query:

query GetReportStatForCrawl(
$crawlId: ObjectID!
$reportTemplateCode: String!
$after: String
) {
getReportStat(
input: {crawlId: $crawlId, reportTemplateCode: $reportTemplateCode}
) {
crawlUrls(after: $after, reportType: Basic) {
nodes {
url
redirectChain
redirectedToUrl
foundAtUrl
httpStatusCode
deeprank
level
redirectedToStatusCode
redirectCount
foundInGoogleAnalytics
foundInGoogleSearchConsole
foundInBacklinks
foundInList
foundInLogSummary
foundInWebCrawl
foundInSitemap
}
totalCount
pageInfo {
endCursor
hasNextPage
}
}
}
}

Try in explorer