Tech Hacks & Tricks - Paraamarsh Business Blog https://blog.paraamarsh.in/category/tech-hacks-tricks/ Everything you Need for a Business Mon, 13 Jun 2022 17:09:57 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 Beginner’s Guide: How Do I Change My Hosts File? https://blog.paraamarsh.in/beginners-guide-how-do-i-change-my-hosts-file/ https://blog.paraamarsh.in/beginners-guide-how-do-i-change-my-hosts-file/#respond Mon, 13 Jun 2022 16:40:14 +0000 https://blog.paraamarsh.in/?p=109 How Do I Change My Hosts File? What Is a Hosts File? The hosts file allows you to set IP addresses for a domain on your local computer that may override the authoritative DNS. This will allow you to see what a domain will display if it is pointed to a different server. This article […]

The post Beginner’s Guide: How Do I Change My Hosts File? appeared first on Paraamarsh Business Blog.

]]>
How Do I Change My Hosts File?

What Is a Hosts File?

The hosts file allows you to set IP addresses for a domain on your local computer that may override the authoritative DNS. This will allow you to see what a domain will display if it is pointed to a different server. This article covers the following topics:

  • How to Recognize a Hosts File?
  • Why Change the Hosts File?
  • Editing Your Hosts File
    • Browser Plugin
    • Editing System Files
  • DNS Flush

How to Recognize a Hosts File?

The hosts file is a plain text file, and is usually named hosts. A typical hosts file will have one or more lines referencing your local computer (as ‘localhost’) and will resemble this:

127.0.0.1 localhost
123.45.67.89 www.example.com
#98.76.54.32 www.another-example.com

A hosts file can be edited to override your network settings and thus allow your local machine to view a website prior to the DNS changes propagating.

Why Change the Hosts File?

Changing your hosts file is a temporary measure to preview your site as it will load from your Itsmydomain server. This lets you make changes on a server other than the one loaded by your domain when visitors access your page.

This is very useful for development purposes, as you can work on your site on an alternate server using a hosts file while visitors may still visit and use your existing site.
Itsmydomain recommends changing your hosts file for development. It provides the most stable development environment. Other methods can cause configuration issues after development is complete.

Editing Your Hosts File

To change the host your domain loads from, you will need to know the correct IP for your server. Itsmydomain servers will require you to use the IP address displayed in your cPanel.

You can view your IP by accessing your cPanel

Once you know your server IP address, there are 2 ways that you can change the host your domain loads from. This article will cover each of them:

  • Browser Plugin
  • Editing System Files

Note: Remember to undo and changes you make after you’re done viewing your site, as any of these changes will prevent your domain from loading the correct DNS.

Browser Plugin

Many browsers have plugins that will allow you to make this change without loading your site through a proxy. If you need to test SSL installation or payment gateways, this may be vastly preferred over using third party web proxies.

We recommend the following plugins for Firefox and Chrome, depending on which browser you prefer:

Both plugins require your desired host and your cPanel IP to load it from. Each plugin will have different instructions to use, and may differ based on version.

Editing System Files

Lastly, you may change the host your local computer loads your website from by directly editing your system’s hosts file. This method will be easier if you are an experienced user of the operating system on your local PC.

All operating systems will have a hosts file like our example:

127.0.0.1 localhost
123.45.67.89 www.example.com
#98.76.54.32 www.another-example.com

Add the second line in this example to your hosts file, with the following edits:

  1. Replace “123.45.67.89” with the IP address from your cPanel.
  2. Replace “www.example.com” with your actual domain name.

You may deactivate a line to undo this change by prefacing it with a “#” (as in the third line above). This will cause the line to be ignored.

Click the links below to expand specific instructions for how to make this change your desired operating system:

▷ Windows

▷ Mac OS X

▷ UNIX

DNS Flush

Once you have modified your hosts file, it is recommended that you flush your DNS so that the new changes can be implemented more swiftly. DNS flushing must be done using command line. Depending on your computer’s OS, there will be different commands.

The post Beginner’s Guide: How Do I Change My Hosts File? appeared first on Paraamarsh Business Blog.

]]>
https://blog.paraamarsh.in/beginners-guide-how-do-i-change-my-hosts-file/feed/ 0
How to Flush DNS in windows 10? https://blog.paraamarsh.in/how-to-flush-dns-in-windows-10/ https://blog.paraamarsh.in/how-to-flush-dns-in-windows-10/#respond Mon, 13 Jun 2022 16:28:58 +0000 https://blog.paraamarsh.in/?p=106 A very common issue you may encounter is when your local DNS resolvers cache a domain name to IP mapping. When you’re trying to go to the domain, it’s actually pulling up an old IP address (cached on your own computer) instead of looking for a new one and finding the correct record. This article […]

The post How to Flush DNS in windows 10? appeared first on Paraamarsh Business Blog.

]]>
A very common issue you may encounter is when your local DNS resolvers cache a domain name to IP mapping. When you’re trying to go to the domain, it’s actually pulling up an old IP address (cached on your own computer) instead of looking for a new one and finding the correct record.

This article will give you the steps required to clear your cached DNS records.


How to flush DNS in Microsoft Windows 10

  1. Close the application you’re currently working with, such as an internet browser or email client.
  2. Press the Windows Logo + R keys together simultaneously. This will cause the Run dialogue window to appear.
  3. Type cmd in the text box and select OK.
  4. When the black screen appears, type the following command and hit enter:ipconfig /flushdns
  5. Restart your application (browser or email client).

Mac OS X

It is important to note before following these instructions that the command in step 4 is specific to Mac OX 10.10 Yosemite and will not work on prior versions of Mac OSX as this command changes between versions. It is advised that you follow Apple’s instructions to check your version number, and look for the command specific to your version of OSX.

  1. Close the application you’re currently working with, such as an internet browser or email client.
  2. Navigate to your Applications folder.
  3. Open Utilities and double click on Terminal.
  4. Type the following command and hit enter:
    sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches;say flushed

  5. Enter the admin username and password when prompted.
  6. Restart your application (browser or email client).Don’t worry if either command says something like “Not found”, and continue to restart your application.

OSX Daily has excellent lists of prior OSX versions and commands:


Linux

Note: Different distributions and versions of Linux may have slightly different commands due to differences in configuration. One of the commands below will probably work.

  1. Open up a root terminal window (Ctrl+T in Gnome).
  2. Type the following command and hit enter:/etc/init.d/nscd restartYou may need to use sudo depending on your installation instead:sudo /etc/init.d/nscd restartSome distributions support this command:sudo /etc/init.d/dns-clean startOr support this command:sudo service nscd restart

    Some installations may have NSDS located in another directory, like the following example. You may need to locate where it is installed to be able to execute the correct command.

    /etc/rc.d/init.d/nscd restart

  3. Restart your application (browser or email client).

The post How to Flush DNS in windows 10? appeared first on Paraamarsh Business Blog.

]]>
https://blog.paraamarsh.in/how-to-flush-dns-in-windows-10/feed/ 0