how do you create page 2 of your website

Category: Website

InMotionFans
n/a Points
Asked:
2013-10-17 2:08 pm EST

Hits: 507
1. If my home page is www.mydomain.com
how do I create a second page www.mydomain.com/aboutme? --
it's not a subdomain per the subdomain tutorial: 'you could create a subdomain called “forum” – and the address would be “forum.yourdomain.com”'
2. per the "What directory should I put my files in?" I would put the source code for the second page into this directory: public_html/addon-mydomain.com--
3. then would I name the source code doc: index.html --just like for the main page?
4.. how do I actually create the page two? would I make up the new link ie www. mydomain.com/aboutme and then put a link to it in my main page source code doc??
Thanks.

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

JacobIMH
Staff
9,968 Points
2013-10-17 2:56 pm EST
Hello and thanks for your questions.

I'll try to answer them all as specifically as I can, you'd probably also find it useful taking a look at our guide on which directory to put your files in which goes over some of the common locations.

1. To create a second page such as example.com/aboutme.htm, you would simply create this file either locally on your computer and upload it, or create it directly on the server. Our guide on creating a new file covers both methods.

2. The What directory should I put my files in? is going to depend on if the site you're attempting to add the file to is a primary domain or an addon domain.

If the second page is for your primary domain then it would be uploaded to the /public_html/ directory. If it was for an addon domain it would then be /public_html/addondomain.com/.

3. By default, the DirectoryIndex setting of your site will attempt to pull up default documents from a directory such as index.html, or default.html. If you wanted it to instead pull up a different file by default, then you could change your default Index page in .htaccess.

So for instance if you set your DirectoryIndex setting to firstPage.htm, and then you created a secondPage.htm, and you had both of these HTML files in your /public_html/ directory for the domain example.com. When you went to just example.com in your web-browser it would by default pull up the firstPage.htm page, but not display the name of the page and just leave example.com in the address bar. Then if you wanted to access the second page you would just enter in example.com/secondPage.htm in your web-browser, or you would need to create a hyperlink from your default page to the secondPage.htm for people to access it from a link on your page.

4. Again to actually create page 2, you would either create this page locally on your own computer, and then upload it to the server. Or using cPanel's File Manager to create the file. In order to link to your second page from your main one, this would require creating a hyper link from the first page.

So as an example, let's say you stuck with index.html as your default document. If you also had a secondPage.html file alongside that first file both in your /public_html/ directory, then this is the code you'd use to create a link to the second page:

<a href='secondPage.htm'>This is a link to my second page</a>


The text This is a link to my second page would be what the link actually said, and the href='secondPage.html' part defines the URL that should be displayed when the link is clicked.

I hope that helps steer you in the right direction. If you had any further questions at all, please let us know!

- Jacob

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!