Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Repeated index.html in Home Page URL

I'm attempting to code my website for the first time. After entering the domain name in the browser, my home page's URL displays as "domain-name.com/index.html/index.html".

How do I change the URL to just display as "domain-name.com" without "index.html" at the back, or at least not have it repeated within the URL?

I tried renaming the html file of the Home page from "index.html" to other forms eg. "home.html" and the webpage would not load after that.

Is there any way to work around this?

2 Answers

Steven Parker
Steven Parker
231,007 Points

Is it possible that you have a directory named "index.html" and the web pages are inside that?

Otherwise, you might want to talk to your hosting company's customer assistance staff about this.

Hi Steven thanks for replying!

Yes the directory is named "index.html" with the web pages nested inside. I changed it to index.html as the website did not load properly at all when it was named otherwise. I even tried to move all the web pages outside of it to place them under public_html, which caused loading issues too.

Steven Parker
Steven Parker
231,007 Points

Placing the pages directly in "public_html" would be the normal arrangement. You might try eliminating the extra folder and putting them there and then find another solution to any remaining loading issues.

If you need more help, you might try replicating your website in a Treehouse workspace, then you can make a snapshot of your workspace and post the link to it here.

Thank you very much Steven! I've finally resolved all the issues πŸ™πŸΌπŸ˜„