Blog

  • Locating and Editing Your Host File in Windows 10

    Locating and Editing Your Host File in Windows 10

    What is a Hosts File?

    The hosts file is a local plain text file that maps servers or hostnames to IP addresses. This file has been in use since the time of ARPANET. It was the original method to resolve hostnames to a specific IP address. The hosts file is usually the first process in the domain name resolution procedure. Here is an example of a hosts file entry.

    127.0.0.1 localhosts #loopback

    We use the above code as an example since it almost always included in every hosts file. Another example would be similar to the following entry.

    Note:We have added the curly brackets around each entry in the hosts file below to better define each section.

    {67.225.187.61} {hostinginindia.com} {#HostingInIndia}

      1. The first section denotes the IP address to which a request will be redirected.
      2. The second section designates the location that we want to redirect a request from.
      3. The third section specifies a comment for the entry.
      4. Each entry is usually separated by a space or a tab.

    We would add the above entry to our hosts file to associate the hostname (or domain name) hostinginindia.com with the IP address 67.225.187.61. To provide a working example, let’s move on to the next section.

    Why is a Hosts File Useful?

    Let’s say we have just completed a migration to a new server. In order to see how our domains will look and operate on our new server before we move our DNS settings, we cannot just type in one of our current domain names as it will resolve to the old server we are moving away from (since we never move our DNS A records from the old server until we are sure the new site is working as expected).

    So, to see how our domain will look on the new server, (without having to change our DNS records) we can simply modify our local hosts file to point the domain to the new server’s IP. If our domain is hostinginindia.com the old IP is 67.225.187.61 and our new IP will be 72.30.35.10, we can temporarily comment out the current hostinginindia.com entry (using a ‘#‘ symbol) and add an alternate entry that points to the new servers IP.

    #67.225.187.61 hostinginindia.com

    #HostingInIndia 72.30.35.10 hostinginindia.com #this is the new hostinginindia.com

    If we added the above entry to our hosts file, every time we open hostinginindia.com in our browser, we will now be redirected to the 72.30.35.10 IP.

    Where is the Hosts File Located?

    The location of the hosts file will differ by operating system. The typical locations are noted below.

    1. Windows 10 – “C:WindowsSystem32driversetchosts”
    2. Linux – “/etc/hosts”
    3. Mac OS X – “/private/etc/hosts”

    What Does a Hosts File Contain?

    A hosts file contains entries similar to the following information. Your entries may differ significantly.

    # This file is automatically generated by WSL based on the Windows hosts file:
    # %WINDIR%System32driversetchosts. Modifications to this file will be overwritten.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.

    127.0.0.1 localhost
    127.0.1.1 mycomputer.localdomain mycomputer

    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters

    How Do I Edit my Hosts File?

    Warning: Firefox now uses DNS over HTTPS (or DOH) by default. That means instead of checking your local hosts file or even your DNS resolver. Firefox simply makes the DNS request over HTTPS from within the browser. This behavior guarantees that the website displayed points to the IP address that the Internet sees as authoritative for that domain. There are two primary ways to avoid this behavior while testing your new site. First, use a different browser. Chrome, Edge, Safari, and many others do not have this setting enabled by default and will continue to work as expected with a modified hosts file. The second method is to disable DOH in your Firefox browser. Follow the directions below to disable this setting. 1. Open your Firefox browser. 2. Click the menu button and select Options. 3. In the General panel, scroll down to Network Settings and click the Settings button. 4. In the dialog box that opens, scroll down to Enable DNS over HTTPS. 5. Uncheck the box beside Enable DNS over HTTPS. 6. Click OK to save your changes and close the window. You can now edit your Hosts File and proceed with testing your new site like you normally would. We do recommend re-enabling this feature as it keeps you safer while browsing.

    Our etchosts file is only editable as a Windows administrator.  Here is a short video on how to edit a hosts file.

    Here are the directions on how to modify your hosts file.

    Step 1.
    Click the Windows button and type Notepad in the search bar.

    Step 2.
    Right click on Notepad and then Run as Administrator.

    Step 3.
    You’ll be asked, “Do you want to allow this app to make changes to your device?”. Choose Yes.

    Step 4.
    In Notepad, choose File then Open.

    Step 5.
    Navigate to C:WindowsSystem32driversetchosts or click the address bar at the top and paste in the path and choose Enter.  If you don’t readily see the host file in the /etc directory then select All files from the File name: drop-down list, then click on the hosts file.

    Step 6.
    Add the appropriate IP and hostname at the end of your hosts’ file, select Save, and then close the file.

    Step 7.
    Finally, you will want to flush your DNS cache for your computer to recognize changes to the file. Click the Windows button and search the command prompt.

    Step 8.
    Type the following command in the terminal and press Enter

    ipconfig /flushdns

    Bottom Line

    Modifying a hosts file has many benefits which can significantly impact how you view your new domain or website. Using this method to view a site allows us to see how any new changes affect the layout and functionality of a domain.

    Should you have any issues when modifying this file, our Support Teams are filled with experienced Linux technicians and talented system administrators who have an intimate knowledge of how to facilitate this modification. We are always available to answer any inquiries with issues related to this article, 24 hours a day, 7 days a week 365 days a year.

    If you are a Fully Managed VPS server, Cloud Dedicated, Private Cloud powered by VMware, Private Parent server, Managed Cloud Servers, or a Dedicated server owner and you are uncomfortable with performing any of the steps outlined above, we can be reached via phone at +91 9818652075, or via a chat or support ticket to assist you with this process.

  • HostingInIndia – 5 Ideal WordPress Email Plugins

    HostingInIndia – 5 Ideal WordPress Email Plugins

    Email marketing has become a cornerstone for businesses looking to connect with their audience effectively. In 2019, it was clear that email remained the top choice for marketers. The reason for this is simple: email provides an amazing return on investment, often reported at 4,400%. This means that for every dollar spent on email marketing, businesses could expect to earn $44 back. Such impressive numbers make email a powerful tool for reaching customers and driving sales.

    If you are using WordPress for your website, choosing the right email plugin is essential for your marketing efforts. There are many options available, but some stand out due to their features and ease of use. Here, we will explore five excellent WordPress email plugins recommended by HostingInIndia. These plugins can help you manage your email campaigns more effectively, allowing you to engage with your audience and grow your business.

    First on the list is **Mailchimp for WordPress**. This plugin is popular for its user-friendly design and powerful features. With Mailchimp, you can easily create email sign-up forms and connect them to your Mailchimp account. It also provides options for automating your email campaigns, which saves you time and effort. The ability to track and analyze your email performance is another great feature, helping you refine your strategies for better results.

    Another great choice is **WPForms**. This plugin not only allows you to create beautiful contact forms but also integrates seamlessly with email marketing services. You can collect email addresses and send out newsletters directly from your WordPress site. WPForms is known for its drag-and-drop builder, making it easy for anyone to create forms without needing to know how to code. This makes it perfect for beginners and experienced users alike.

    Lastly, **OptinMonster** is a powerful solution for generating leads through email marketing. It helps you create eye-catching pop-ups and opt-in forms that capture visitors’ attention. With its advanced targeting options, you can display your forms based on user behavior, increasing the chances of capturing email addresses. OptinMonster also provides detailed analytics, allowing you to see how well your campaigns are performing and make necessary adjustments.

    In conclusion, selecting the right email plugin is crucial for your marketing success on WordPress. Each of the plugins mentioned offers unique features that can help you build and manage your email list more effectively. By leveraging these tools, you can engage with your audience, boost your sales, and ultimately achieve a higher return on your marketing investments. With the right approach, email marketing can continue to be a powerful ally in your business growth strategy.

  • How can I Host My Own Website?

    How can I Host My Own Website?

    Hosting your own website can be a rewarding endeavor, providing you with full control over your online presence. While it requires some technical knowledge, patience, and resources, hosting your website allows you to customize every aspect to your liking. Choose Your Setup: Decide whether you want to host your website at home or on a remote server. Hosting at home involves setting up a web server on your computer, while remote hosting requires renting a virtual private server (VPS) or a dedicated server from a hosting provider. Decide on Hosting Software: For hosting at home, you’ll need server software. Popular options include Apache, Nginx, and LiteSpeed. For remote hosting, your provider will typically offer software options for you to choose from. While hosting a website on your own computer is possible, the process requires advanced technical knowledge and more resources. You should understand how to set up a WWW server – software allowing Internet users to access website files on your computer – and the computer must stay on at all times, as the website will be unavailable if it turns off or reboots. Save money and time by opting for Hostinger’s hosting services. Let us do the work, so you can focus on your passion. Select a Domain Name: Choose and register a domain name that reflects your website’s content and purpose. Use a domain registrar to purchase and manage your domain.Decide whether you want to host your website at home or on a remote server. Hosting at home involves setting up a web server on your computer, while remote hosting requires renting a virtual private server (VPS) or a dedicated server from a hosting provider. For hosting at home, you’ll need server software. Popular options include Apache, Nginx, and LiteSpeed. For remote hosting, your provider will typically offer software options for you to choose from.Hosting your own website can be a rewarding endeavor, providing you with full control over your online presence. While it requires some technical knowledge, patience, and resources, hosting your website allows you to customize every aspect to your liking.