How to build a website

Source: Internet
Author: User
Tags php language domain name server hosting icann web hosting mx record

First, the preparation of the station material: domain name and space


A web site is usually composed of a domain name and a bunch of web page files:

Domain name is the name of a computer or group of computers on the Internet consisting of a dotted list of names used to identify the computer's electronic orientation (or, in some cases, geographic domain name, a local area with administrative autonomy) during data transfer. A domain name is a "mask" on an IP address. A domain name is designed to facilitate the memory and communication of a group of server addresses (website, email, FTP, etc.). As the name of a memorable Internet participant, the first registered domain name in the world was registered in January 1985. Domain names can be categorized into different levels, including top-level domains, two-level domain names, three-level domain names, and registered domain names.

Website space: Simply speaking, is the space to store the content of the website. Web site space is also known as virtual host space, usually the enterprise does not own the Web site server, but instead of the virtual host space as the site to place the content of the website space. Website space refers to the capacity of files and materials, including text, documents, databases, Web pages, images and other documents. Whether it is for small and medium-sized enterprises or individual users, owning their own website is no longer a difficult task, investment of hundreds of yuan you can easily through to the web hosting provider to rent a virtual host, in this way to build the site.


Two. Specific configuration

(1), the setting of the domain name

After registering a domain name, the domain name is yours (in the domestic registration to pay attention to, modify registered contacts, management contacts, technical contacts and paid contacts, if you can not find the change in the background, then congratulations, this domain name is not yours, but a dishonest businessman, use Whois to check the domain name information it, Get the Authorization Code (AUTH code), there is also called the Domain name transfer password, this code is very important, if you do not know or unscrupulous businessmen do not tell you, that again congratulations, this domain name is still not yours, want to move to another registrar can not move, in case you do not encounter this situation, then go to ICANN complaints merchants, Three times a day, if a registrar is always complained, ICANN will fix it, and you must know what you are entitled to as a consumer.


If the domain name really belongs to you, then you are not happy with the Registrar any day, you can also kick it off, transfer to another registrar.


The domain name is set up primarily with some parsing work, including:

Name server: Usually a URL such as ns*.***.***, this server is responsible for parsing the following various settings, that is, it is the boss of the domain name settings. Some of the domestic domain name registrars usually use this as a means to get stuck with users, such as restricting your only domain name servers, and then restricting you to set up up to 10 A records or MX records, and so on, this is a very ridiculous rule, especially for those who need more subdomains, this is very inconvenient , the situation is better abroad, at least I have not seen any restrictions on your use of a specific domain name server;

A special mention is that some space service providers only need you to set the domain name server as their domain name server, all the remaining resolution problems you basically do not have to control, you can freely create subdomains, without having to add a record


Domain Name resolution:

is to point the domain name to the site space IP, so that people through the registered domain name can easily access to the site a service. IP address is the digital address that identifies the site on the network, in order to facilitate the memory, the domain name is used instead of the IP address to identify the site address. Domain name resolution is the process of converting a domain name to an IP address.  The resolution of the domain name is done by the DNS server. Domain name resolution is also called the domain name, server settings, domain name configuration and reverse IP registration and so on. The simple point is that the well-remembered domain name resolves to IP, the service is done by the DNS server, is to resolve the domain name to an IP address, and then the host on this IP address on a subdirectory with the domain name binding.


1, a record resolution record type Select "a"; is to point the domain name to the host IP, you can point the top-level domain or sub-domain name to a specific IP, so your sub-domain name and top-level domain name can not be on the same server, record the value of the host IP address provided by the space provider; ; The TTL is set to the default of 3600.


2. The CNAME record resolves the CNAME type resolution setting in the same way as the A record type, where the record type is modified to "CNAME" and the value of the record is populated with the server host address.


3, MX record resolution MX record parsing is to do mailbox resolution use. Record type Select MX, line type select generic or add three line types for telecom, Netcom, Education network records; record value fill in the server IP address or alias address provided by the Post Office provider, the TTL is set by default of 3600, the MX priority fills in the data required by the Post Office provider, or the default 10, When there are multiple MX records, the priority is to set the data differently.


(2), the host settings


After the domain name has been set up, the host also needs some echo work. If the domain name is set to a record, but the host does not "receive", the website also cannot use. Host how to receive depends on its installed website service program, now popular is Apache, of course, there are a few sites still holding windows IIS thigh (with ASP language +access database), it is said that in recent time a new software, there is the possibility of replacing Apache, the name has been forgotten.

Take Apache for example, the host will create a virtual host configuration file, tell the server, "Hey, there is a website point to you, you want to serve this site, this site in a directory, if users visit a URL, You are responsible for taking the files out of the directory to the user to see. "The general principle is this, the details are not much to say."

For the user, do not care so much detail, the above principle of implementation for you is in the background to bind the domain name to the host directory (and sub-domain name binding to subdirectories). In general, the site needs two additional tools to allow the owner to configure their own site, that is, FTP and database.

1, FTP Transmission Web page file FTP is used to transfer files to a server, as long as you purchase a virtual hosting service, you will generally give you an FTP account, you can use this account to log on to your host, the Web page files, and then users can access. A little common sense is that index.htm/ index.php such as web files is usually when you access a directory when the host will automatically find the files for you, such as you visit Yihui.name, the host will automatically find there is no index.php, if there is, execute this file, generate HTML to your browser.  The file name may be configurable, but it is not recommended to be a maverick.  Now a lot of mature station system, downloaded from the Internet and then uploaded to the server, access to your Web site, follow the prompts step by step configuration, with the installation of software is no different. 、

2, Web site database dynamic site Most need a database (even if it is a text file "database"), if your site in PHP language, then MySQL is absolutely perfect. If the Php+mysql space (the General Linux host is this), the host will assign you the MySQL database account number, including: Database host (mostly localhost), database name, user name, password. These four items will require you to fill in the process of installing the Web application.


Three. Operation of the website


For programmers, the first example is usually Hello world, and if you want to see Hello World, write "Hello World" with any text editing tool in a text file. Named index.htm (Note that Windows hides the file name extensions by default!) You make sure the file name is not index.htm.txt, I don't care, upload to the root of the website, and then visit your website, you can be delighted to see this old no longer old Hello world.

A decent site is certainly not Hello world so simple, it runs like a complex program, there may be function calls between files and database access and so on. The world really develop Web site program is certainly a few people, so do not worry, you use other people's program it, typical web system has:

Blog System (blog): Recommended WordPress, the reason is that the program is written concise, strong extensibility, I used to use domestic bo-blog system, and later did not have to live the temptation to go to WP

Content Management System (CMS): News gossip station, tutorial station, and so on, as the name implies is filled content, this site probably is to copy each other, not a few serious write, so in order to alleviate the pressure of reading, please Sir Cherish life, away from this site, also do not repeat the construction

Forum System (BBS): Netizens should be very familiar with this, the domestic common system has phpwind, discuz, foreign flourished has phpbb, I personally recommend a relatively new debut bbpress, the reason with WordPress, In everyone desperately to increase the functionality of today (make users face a lot of options to burn), rare to see a desperately reduced function of the forum system

Wiki: Wikipedia uses the MediaWiki system, and if you don't want the wiki to interact with the database, DokuWiki will be a good choice, it doesn't require database support, it's all text file operations.


The installation of the site did not say anything, the general is to put the Web file on the end of the server, and then visit your Web site, follow the prompts to walk. The site name is set to the name, the password to lose passwords. Then you will realize that a small individual can also create a seemingly scary big website.

But the maintenance of the site is not a simple thing, and when you have the right to face all the options, you will feel pain. Build a website to have a good mentality, never perfect mentality, otherwise this life will have to constantly change. Suggest you crossing to learn HTML and CSS and Php+mysql, or not recommend it?  I don't know. There are search engine optimization (SEO), take some strategy to make search engine like your website, make your search ranking up front, you have to learn what is meta information (keywords, description), what is 301 redirect, what is 404 error, What is the Apache rewrite module what is pseudo static URL ... Welcome to visit www.xud0.cn

This article is from the "perfect fleeting" blog, please be sure to keep this source http://1666053609.blog.51cto.com/9688895/1735042

How to build a website

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.