WmZilla - Webmaster and Marketplace

The Next Generation Webmaster and Trade Forum

How to Identify Broken Links with Google Sheets? | Dopinger Video

Moncho

New member

0

0%

Status

Offline

Posts

30

Likes

0

Rep

0

Bits

160

3

Months of Service

0%
Here is the rewritten content in English:

To retrieve the status code of a given URL, use the following function:

```javascript
function getStatusCode(url){
var options = {
'muteHttpExceptions': true,
'followRedirects': false,
};
var url_trimmed = url.trim();
var response = UrlFetchApp.fetch(url_trimmed, options);
return response.getResponseCode();
}
```
 

249

6,622

6,642

Top