Today, we’re introducing a new feature in On-Page API – www redirect check.
It will enable you to determine whether a website has properly configured redirect from the www version of the domain to the non-www version.
To use the new feature, simply set
true in the body of your POST request.
Then, by using the Summary endpoint of On-Page API, you will obtain several new parameters:
test_www_redirect will indicate the www to non-www redirect is implemented if the field is
www_redirect_status_code will show the status code of the www to non-www redirect. In most cases, it is recommended that redirect returns a 301 status code.
You can also use the earlier implemented
is_www parameter to review the number of pages on a www subdomain.
We hope this new feature will help you analyze and set up www redirects to ensure consistency and better user experience across your website, while also eliminating potential duplicate content and ranking issues.
Don’t hesitate to check the updated documentation.