How to Remove File Extension (.php or .html) from URL on Ubuntu Server

As from the SEO point of view it is better to don’t use file extensions so that you have user-friendly URLs on your site. For Example,lets take ( ) you want to have it as ( ).

Let’s start integration:

Having Trouble in configuring ubuntu server on google cloud ,check this detailed blog

Once the Setup is done on your ubuntu server,just follow the commands below and paste on your server.

Lets get into your root folder

sudo su


sudo nano /etc/apache2/apache2.conf

Now Scroll down till you find the directory var/www and paste the following code there

Now CTRL+X and then you get option yes or no,click yes and just restart apache2 server

sudo service apache2 restart

Blog Categories

Looking for a Top Rated* Marketing Company?

Contact us at +1 630 999 (7768) or submit a business inquiry online.

NectarSpot team executed the Quick and solid build of AMP website. Not afraid of small tweaks here and there. The team has, from the beginning of project, focus on conversion and provided a seamless workflow for my prospects to visit, educate and finally purchase on my e-commerce portal. They provided design, development on AMP framework and helped to host e-commerce portal on scalable and secure google cloud. We are looking forward to working with them in future for other projects as well.

Read More....

Ryan Frederickson

Art Wine Preserver

Read more to gain insights from our blogs.
Receive latest marketing insights, data and inspiration by subscribing .

Start Your Project Today (100% Satisfaction Guaranteed)

  • NectarSpot Inc. is an integrated digital marketing agency specializing in Design & Development of Web, Mobile & Voice Applications.
    We excel in providing Optimization, Automation, PPC & Analytics services to high performing brands across industries.

    Contact us today at +1 630 999 (7768) or email at to know more.

Need help?

We are right here!