How To Replace localhost With Your Domain Name

Introduction

We will learn how to change localhost to a custom domain name in this article. Some off our third party integrations are not accept a local URL so in this case we can use this domain name URL for testing in our local app.

 

let’s start

Step 1: first open My computer in your computer and navigate to C drive 

Step 2: Open folder named Windows

Step 3: after open windows folder find folder name ‘system32’

Step 4: In this folder find folder named ‘drivers’

 

Step 5: In this folder find a folder named ‘etc’

Step 6: In this folder find the file named Host and open this file with notepad

 

Now at the end of this file add the following line

127.0.0.1   [your domain name]

Add this line into the file like below :

 

Now save this file and run your program with this domain name with your localhost port

for example : https://mylocalapp.test:35026

 

Replace your post with my post and you can use this URL

That’s it

 

 

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe

Select Categories