New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-robots.txt

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-robots.txt

Express middleware to handle different robots.txt responses on different domains

1.0.1
Source
npm
Version published
Weekly downloads
35
40%
Maintainers
1
Weekly downloads
 
Created
Source

express-robots.txt

Express middleware to handle different robots.txt responses on different domains. The goal with this middleware, is to avoid search engine indexing of public dev/test/demo/staging-servers etc.

Install

Install with npm:

npm install express-robots.txt --save
Setup

A minimum of an array of domain names must be supplied. Optional the response text for allowed domains and disallowed domains can be passed.

robotsTxt(allowedDomains[, allowedText] [, disallowedText]);

Simplest usage:

var robotsTxt        = require('express-robots.txt');
var robotsTxtHandler = robotsTxt(['domain.com', 'www.domain.com']);

app.use(robotsTxtHandler);
Defaults

allowedText defaults to:

User-agent: *
Disallow:

disallowedText defaults to:

User-agent: *
Disallow: /

Keywords

express

FAQs

Package last updated on 05 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts