Directory (folder) structure of homepage

When the homepage is made by using the domain by the rental server, both the main and the subdomain might be used. In this case, it thought what folder (directory) structure was good.

Folder structure of homepage when subdomain is not used

When the subdomain is not used only by the main domain, it is not especially difficult at all. The homepage is only usually made.

The index file is put on the root directory, and the directory of each genre is made as follows. Moreover, the directory where the picture file of each genre is put is made.

The file operation is done easily when the homepage is made a layered structure like this and it is convenient. Is nobody putting all files on the root directory?

root/ 
  |-- index.htm 
  |-- File of route of the main domain
  |-- Genre 1/
  |     |-- img/ 
  |     |    |-- Picture file
  |     |-- index.htm 
  |     |-- File of genre 1
  |-- Genre 2/
        |-- img/ 
        |    |-- Picture file
        |-- index.htm 
        |-- File of genre 2

What is the subdomain?

The subdomain is an identifier applied to the computer and the network that exists in the Internet. The domain name is a layered structure like the address of real existence, it is delimited by "." such as "Domain name that identifies the country", "Domain name that identifies the organization", and "Domain name that identifies an individual server", and it queues up sequentially. The domain name to identify this our smaller classification is called a subdomain.

For instance, "co" is a subdomain of the "jp" domain in "www.yahoo.co.jp", "yahoo" is a subdomain of the "co.jp" domain, and "www" is a subdomain of the "yahoo.co.jp" domain.

Method 1 of adding subdomain later (Do not recommended)

If the homepage is made putting the main domain on the route and making the subfolder in the subdomain, it becomes the following.

In the root directory, the route of the main domain in addition to the subdomain and the directory of each genre is filed, and the management of the file by the main domain is confused and it becomes very troublesome.

root/ 
  |-- Subdomain 1/
  |-- Subdomain 2/
  |-- index.htm 
  |-- File of route of the main domain
  |-- Genre 1/
  |     |-- img/ 
  |     |    |-- Picture file
  |     |-- index.htm 
  |     |-- File of genre 1
  |-- Genre 2/
        |-- img/ 
        |    |-- Picture file
        |-- index.htm 
        |-- File of genre 2

Method 2 of adding subdomain later

The file of other main domains puts a part of file of the main domain on the route of the server, and if the homepage is made making the subfolder, is as follows.

In the root directory, there is only a part of the file of the route of a directory of the subdomain and each genre and the main domains. The main domain is filed since the subfolder of the main domain the main, and it becomes easy to manage the file a little.

However, the subfolder of the main domain becomes a useless folder, becomes deep the hierarchy on the homepage, and is not desirable after SEO in this method. Moreover, it is necessary to devise operation and the FTP of the main domain.

My homepage was such a structure up to now. Because the server had been moved due to the trouble of the server this time, the structure of the homepage decided to be reviewed. (February, 2009)

root/ 
  |-- Subdomain 1/
  |-- Subdomain 2/
  |-- index.htm 
  |-- A part of file of route of the main domain
  |-- Subfolder of the main domain/
        |-- The remainder of file of route of the main domain
        |-- Genre 1/
        |     |-- img/ 
        |     |    |-- Picture file
        |     |-- index.htm 
        |     |-- File of genre 1
        |-- Genre 2/
              |-- img/ 
              |    |-- Picture file
              |-- index.htm 
              |-- File of genre 2

Method of operating the main domain as subdomain (recommendation)

There is a method of operating the main domain as a subdomain. The main is made blank by setting the domain of the server, and the main domain and the subdomain are set. If the homepage of the main domain is made thus, very refreshingly do not worry about the thing of other subdomains at all, and it becomes the following.

root/ 
  |-- Subdomain 1/
  |-- Subdomain 2/
  |-- Main domain/
        |-- index.htm 
        |-- File of route of the main domain
        |-- Genre 1/
        |     |-- img/ 
        |     |    |-- Picture file
        |     |-- index.htm 
        |     |-- File of genre 1
        |-- Genre 2/
              |-- img/ 
              |    |-- Picture file
              |-- index.htm 
              |-- File of genre 2

Because many of addresses on the homepage change when changing from "Method 2 of adding the subdomain" to "Method of operating the main domain as a subdomain" thus, it is necessary to forward it by using the htaccess file (permanent move)301. Otherwise, the number of accesses decreases suddenly.

When the subfolder name of the main domain of "Method 2 of adding the subdomain" is assumed to be abc, and the abc folder is deleted, the htaccess file put on the domain route is set as follows.

redirect 301 /abc/ http://domain/

The main domain part is made another by setting the FTP.

Because the FTP can be set by the subdomain in xrea.com and coreserver.jp of the rental server besides the main, the main domain as keeps original and is as convenient as that of the subdomain the password etc. of the FTP. It becomes easy to manage very much.