User Agents

Posted on 2000-03-23
Medium Priority
Last Modified: 2010-04-09
User Agent
Is it possible to disallow some user agents on a web site ??, lets say I don't want
Teleport Pro/1.29
to have access to my web, is that an option somehow ??

If people want to use my site, then they can go to it !! Whay copy the hole site to there own computer ??, it's 20Mb of data, it "overhead" the webserver!
Question by:win32
  • 2
LVL 19

Expert Comment

ID: 2652093
Yes you can do this

Its more of an ASP question though or other server side scripting technology

Do you have ASP facilities on your site?

Author Comment

ID: 2653013
Nope, Ok I see then it can't be doen !

Expert Comment

ID: 2656703
I've seen this done with javascript, but I don't know how to do it.  I take it you are trying to protect your site from crawler apps?
LVL 19

Accepted Solution

daveamour earned 40 total points
ID: 2656872
I can do it in JavaScript


<title>New Page 1</title>

<Script Language="JavaScript">
  if (navigator.userAgent == "Teleport Pro/1.29")
    window.location.href = "http://www.microsoft.com";


However this is not very robust as someone could simply disable Javascript if they wanted to visit your site.  This is the way to do it though if you do want to use Javascript.

Of course you can redirect the window to any page you like - I just used Microsoft as an example.

Alternatively you could have a default page which redirected to the main page other than those user Agents you wanted to keep out.

Again this is full of holes but maybe it will help




Featured Post

7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question