https://github.com/stephangeorg/url-exists-deep
A deeper determination if a url exists.
https://github.com/stephangeorg/url-exists-deep
url validate
Last synced: about 1 year ago
JSON representation
A deeper determination if a url exists.
- Host: GitHub
- URL: https://github.com/stephangeorg/url-exists-deep
- Owner: StephanGeorg
- License: mit
- Created: 2016-10-20T10:00:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-02-12T12:18:06.000Z (over 3 years ago)
- Last Synced: 2025-04-21T15:10:02.425Z (about 1 year ago)
- Topics: url, validate
- Language: JavaScript
- Homepage:
- Size: 704 KB
- Stars: 5
- Watchers: 1
- Forks: 7
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# url-exists-deep [](https://badge.fury.io/js/url-exists-deep) 
A deeper determination if an URL exists.
It tests for:
+ Domain available and accessible
+ Url available and accessible
+ Redirect available and accessible
url-exists-deep was developed for performance and accuracy. To check whether a url
exists and is publicly accessible or not a HEAD request is sent, because this is much faster then a GET.
Most hosts are responding correct. If the host responses with a 403 Forbidden a GET
request with User-Agent and Accept header is sent.
## Installation
```
> npm i url-exists-deep
```
## Usage
```javascript
import urlExists from 'url-exists-deep';
```
```javascript
const url = 'https://www.google.com';
const exists = await urlExists(url);
```
## Result
Returns ``false`` if url does not exists or ``` object ``` with url information.
Makes a deeper determination if a url exists or not. To reduce false negative
responses.
### Rewrites 301
If ```url``` redirects with 301 url-exists-deep follows the redirect and returns
the destination url if exists.