The pwrISBROKENURL PowerUp function determines whether the provided URL is broken or not. This is very useful in checking the status of links or verifying a set of links you have created point to live content.
pwrISBROKENURL(TargetURL, [VerificationMode], [Pattern])
The pwrISBROKENURL PowerUp function has the following arguments:
TargetURL – Required. This is the URL or reference to a URL you want to test.
VerificationMode – Optional. This is one of “STATUS”, “TITLE”, or “URL”. The default value is “STATUS”. Use STATUS when you want to check the HTTP status code returned only. Use TITLE or URL when you want to look for specific strings within the page title or URL.
Pattern – Optional. However, if VerificationMode is either “TITLE” or “URL” this parameter is required. The default value of the pattern is an empty string.
pwrISBROKENURL will return TRUE if the URL is broken. For example, if the page returns a 404 error code pwrISBROKENURL will return TRUE. FALSE will be returned if the URL is not broken.
If the URL redirects to another URL (that is valid), the URL will considered to be good and FALSE will be returned indicating the URL tested is not broken.
Sometimes, a custom “404” page will return a HTTP status code of 200 which indicates a valid page. In these cases, use either the TITLE or URL verification mode to look for text strings that would indicate a 404 or missing content page was returned.
If a page’s HTTP return code is 404, the TITLE and URL verifications are bypassed.
=pwrISBROKENURL("http://officepowerups.com/", "TITLE", "Page Not Found")