Search code examples
html.htaccessurlcustom-url

How to make a customized url for a html page


Website source:http://www.salefee.com/

I have a career section in my website which redirects to http://www.salefee.com/index2.html

I want that that my url should look like http://www.salefee.com/career. I don't want any .html suffix after my url. I have hosted this website using www.godaddy.com

Can someone help me with the code. The website is made in html/css.Thanks in advance!!


Solution

  • Create a subdirectory /career/ in your web files directory, and then put the HTML file index.html in there.

    index.html is the default file that will be returned by the server when the directory level is accessed by the browser.

    Also, for SEO purposes, add a proper <link rel="canonical" href="/career"> tag in the page header.

    Static blog engines like Jekyll or Pelican do it this way too.

    There are more methods to achieve that, via Nginx settings or Apache's .htaccess, but since you are on Godaddy you probably need a simple solution.