---
title: "Pinning to a web server without using the hosts file"
date: "2022-12-21T00:35:18+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/94391-pinning-web-server-without-using-hosts-file"
id: "7b81990d-162a-404a-89a6-8baa53b8ad59"
---

Table of contents will be added

During website development, you may want to force your web browser to point to a specific host for testing. One way to do this is to [Use an `/etc/hosts` file for custom domains during development](https://support.acquia.com/hc/en-us/articles/360004175973-Using-an-etc-hosts-fil). If this isn't easy or feasible for you or your users, it may be possible to use a browser extension instead.

**ModHeader extension**
-----------------------

If you are using Google Chrome as a browser, the [ModHeader](https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj) extension enables you to add and modify the HTTP request headers sent to web servers.

If, for example, you need to access a specific server that is limited to particular regions, you can use this to modify the HTTP request headers you are sending. Once the extension is installed, you'll see a blue icon next to your address bar.

1.  If you click that icon, you should see a screen like this:

![Browser extension interface showing "Profile 1" with a selected host value "www.drupal.org.br" and options for request headers and filters.](https://acquia.widen.net/content/848b3497-6d01-4d3c-baa5-6c0fcec2d87a/web/ka06g000001hacV00N6g00000VCdgi0EM6g000002W83I.png)

1.  Add the Header Host, with the respective domain.
2.  Activate that header by selecting the check box.

This configuration is set globally. While it's active, the extension will send that header to all sites you access with Chrome. Clear the header to disable it.

Define a cookie
---------------

Another method is to define a cookie which can be useful for tailing logs.

In the JavaScript console, in either Firefox or Chrome, simply run the following command (be sure to set the right web node name):

    document.cookie = "ah_app_server=XXX-XXXX;path=/";

When you are done, you can unset the value in the cookie to stop your client being pinned to a specific server:

    document.cookie = "ah_app_server=;path=/";

You can also just delete the cookie in your browser preferences.

More Information
----------------

[Using an /etc/hosts file for custom domains during development](https://support.acquia.com/hc/en-us/articles/360004175973-Using-an-etc-hosts-fil)