Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 191
  • Last Modified:

change dns so that it always take me to one site

is there an example somewhere that i could find to do the following:
when i open my browser, it will always direct me to one website. so say i want to go to www.cnn.com, it will take me to www.yahoo.com and www.google.com, it will take me to www.yahoo.com

in c# please. thanks
0
StewSupport
Asked:
StewSupport
  • 5
  • 5
1 Solution
 
Paul MacDonaldDirector, Information SystemsCommented:
I can't think of any legitimate reason for this.  Can you explain what it is you're trying to accomplish?  Why can't you change DNS manually?
0
 
StewSupportAuthor Commented:
it doesn't have to be an app. is there a way to change the setting in ie manually?
0
 
StewSupportAuthor Commented:
I've requested that this question be deleted for the following reason:

change proxy
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Paul MacDonaldDirector, Information SystemsCommented:
You can edit the "hosts" file on the system.  That will accomplish much the same thing, but it will be for all applications, not just IE.

Here are generic instructions for a Windows system:
http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/
0
 
StewSupportAuthor Commented:
yes but that will prevent the user going to that site, what if i want to redirect them to one site.
0
 
Paul MacDonaldDirector, Information SystemsCommented:
Change the IP address in the hosts file so it appears to be a particular host name.  In other words...
     w.x.y.z     www.yahoo.com
...where w.x.y.z is the IP address for cnn.com.  Then, whenever someone tries to go to www.yahoo.com, they get sent to cnn.com.

If you have a proxy - and your closing reason implies you do - that might be a better/easier solution.
0
 
StewSupportAuthor Commented:
can we use webproxy in c# instead of host file?
0
 
Paul MacDonaldDirector, Information SystemsCommented:
If you mean "webproxy" as in the .Net control, the answer is no.  

I meant "proxy" as in a device that sits between the client and the Internet to control access.
0
 
StewSupportAuthor Commented:
ok but instead of listing out the address can we do like * for all addresses? that way you only do it once time and do i need to restart the machine for this to work?
0
 
Paul MacDonaldDirector, Information SystemsCommented:
No, you can't use wildcards (at least not on Windows machines).
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now