Web Development

How to Enable Missing ‘Localhost’ Prefix in WAMP

So you just recently installed the WAMP server on your PC/laptop and are ready to start your web development process. You launched the homepage of WAMP and clicked on the project folder in the hope of such a URL “https://localhost/yourproject” but you got an error.

When working with WAMP, it is essential to have the “localhost” prefix properly configured, as it allows you to access your local website or application from your web browser. Without it, you may encounter errors or be unable to view your projects locally.

Well, it is due to some settings, as WAMP wants you to use virtual host way to create project URLs. However, you can still enable the old way of showing URL prefixed with ://localhost.

All you need to do is follow the following simple steps:

Steps to Fix Missing Localhost Prefix in WAMP

Step 1

First of all, go to WAMP folder and www directory

locate the index file and follow the steps as shown below

index file of wamp

Find $suppress_localhost

suppress localhost
$suppress_localhost, line 33

Change true into false as shown below

$suppress localhost true
Make sure that highlighted value is True

Restart the WAMP server.

It should be working now. I hope this tutorial helped you fix the issue of missing the localhost prefix on your WAMP localhost server. If you have any questions or suggestions, please let us know in the comment section.

Show More

Raj Maurya

Raj Maurya is the founder of Digital Gyan. He is a technical content writer on Fiverr and freelancer.com. When not working, he plays Valorant.

Leave a Reply

Back to top button