Table of contents

When it comes to Cloud Computing, the very first name that comes to anyone’s mind is the Amazon Web Service AWS. 

AWS caters to diverse cloud-based products ranging from computing to migration, storage to security and many others. AWS is a name trusted by almost everyone around the world. But when it comes to the Chinese market, people tend to think twice before opting for AWS.

A few rumours were heard about AWS leaving the China Market in the past which did not actually happen. At that time, it was difficult to decide whether to go with AWS in Chinese market or not. The other option available was Alibaba Cloud also known as Aliyun. Alibaba Cloud is a subsidiary company of Alibaba Group which provides cloud services to online businesses in China and international market. The current situation is that one cannot put themselves on the global map without considering the huge Chinese market. 

Now there are many options available to host your website in China. The very first option is to host it from your own country. But you will probably not go with this option because your website will be hosted outside Mainland China and their search engines may not index your full website.

Another option is using Content Delivery Network CDN to deliver content without hosting websites in Mainland China. But this option will affect the load speed of your website depending on the geographic location of CDN. You probably want to go with the Hong Kong location if you want to host your website through CDN. To avoid all such problems like SEO rankings, load speed of website, etc., hosting your website in Mainland China is the best option. The search engines will treat your website as a local website if you are deploying a China optimized website. This will boost your search engine visibility and SEO ranking. 

You must be having questions regarding how you can launch your website in China.  The same questions arise when we needed to launch the website for our client located in Mainland China. There were two server options available: AWS and Alibaba but as our targeted audience were based in China, Alibaba Cloud platform was preferred. Alibaba Cloud and its products were used according to the requirements of the website.  There are specific rules that need to be followed inorder to launch your website in China. This blog will help you figure out the step by step process to host your website. 

The topics covered in the blog are:

  1. Alibaba Server Setup
  2. ICP Licence
  3. Elastic Compute Service ECS and its instance
  4. Lamp Stack Setup
  5. Domain Transfer
  6. Domain Mapping
  7. Generating CSR 
  8. Deploying SSL in Apache server

The other Alibaba Cloud Products that were used are

  1. Object Storage Service OSS
  2. ApsaraVideo for VOD
  3. Media Processing 

Alibaba Server Setup

To purchase the server, there were two options available, one was Alibaba International and other was Alibaba for Mainland China. The account on both the platforms are considered to be different. Links for both platforms (International and Mainland China) are and

Proceeding with Alibaba International platform was pretty straightforward and much similar to AWS. But the problem occured  when there was a need to set up the server and migrate domain, set up SSL and setup CDN (Content Delivery Network) using ECS (Elastic Compute Service) which is one of the Alibaba products. 

ICP Licence

In order to host a website in China, there were some procedures that were needed to follow. The first step in that process was to file for an ICP(Internet Content Provider) license. An ICP licence is a registration number and it allows a website to operate on hosting servers and it is a legal requirement set by the Chinese Government. ICP licence is the only way to guarantee fast loading for your website hosted in Mainland China. ICP Licence is divided into two categories: ICP Filling and ICP Commercial Licence.

ICP Filling:

It is the first level of certification and all applicants must apply for it regardless of whether the website is commercial or non-commercial. The ICP filling can take several months but Alibaba Cloud provides the processing within 20 working days.

ICP Commercial Licence:

It allows online platforms or third-party sellers of goods and services to host their website in Mainland China. After obtaining both ICP licence only, one can host their e-commerce website in Mainland China.

International companies without having a registered business office in Mainland China are not eligible to obtain an ICP license. The domestic companies or joint ventures (JVs) with domestic stakes only can apply for ICP licence.
All the details regarding ICP Licence are available on the links mentioned below.


Elastic Compute Service ECS 

After obtaining the ICP licence, the hosting plan was selected. Alibaba provides different cloud servers that fulfills the requirements to host your website. We opted for Elastic Computing Service (ECS). It provides elastic and virtual cloud service for hosting the website. There were different purchasing options available; you can select the one which is suitable as per your need. You can find a list of all the hosting plans and their details on this link

After selecting the proper hosting server, in my case ECS, its instance had to be selected. ECS instance is a virtual machine that contains the components like memory, network, OS and CPU. These ECS instances are categorized into different categories of instance families which caters different business scenarios (mainly memory specification and CPU). I had a platform for on-demand video streaming and basically an educational platform so  the ECS instance that I selected was (ECS.mn4.large). This instance provides 2 virtual CPUs and 8 GiB memory.

Lamp Stack Setup

Once you are done with purchasing the server, you will need to install/setup LAMP stack. It is an open-source software installed together to enable a server to host a website. LAMP stands for Linux, Apache, MySQL, and PHP. The first thing needed was to have an Active Alibaba Cloud account. To launch ECS on a Linux machine was an easy task. I followed some simple steps given below:

1. Logged into my Alibaba Cloud ECS Management Console. On the dashboard select Product Service > Elastic Compute Service. You will be taken to the ECS overview dashboard. You click Instances on the sidebar to navigate to the Instances menu.

2. The next step is to create an instance. There are two packages available and you need to select the data center region and availability zone to launch the instance. 

3. Select Choose Instance type > Generation. Select the generation as per your computing requirement.

4. Select Network type > Classic/VPC network. Select Network billing type. 

5. Under operating systems, select  Ubuntu or any other Linux server  select a version for the server from the drop-down menu. Under the Storage section, select the storage type as per your requirement.

6. Under Security Setup, you can set a password for server’s security. This task can also be performed from the console later.

7. At last, you can review your purchase and can modify it if required. To confirm and launch the server, click Activate.

Here, Linux will be installed. The details and commands to install Apache, MySQL and PHP  are given in the following link

 The complete guide for set up is given here

Please note these links explains the LAMP setup for OS Ubuntu 18.04

Once you are done with the setup of lamp at times you need to set up security groups as well which can be done from the console of the instance after you login.

8. Under Instances > Manage to manage ECS instance.

9. Navigate to Security Group(left panel) > Configure Rules.

Check whether the instance is already set to allow inbound traffic from Port 80. If not, select Add Security Group Rules to create a new rule.

Enter the details as shown below and click OK.

Domain Transfer

After you are done with all the setup of the server, the next step would be mapping domain with server.

Domain Transfer

If your domain is registered with another provider, then you will need to migrate your domain to Alibaba. So there are some additional steps that you need to follow.

  1. If you want to transfer domain to Alibaba’s International Platform then  you need to follow some set of rules:
    • Your domain name must be an existing domain name and it should not contain any illegal characters.
    • Your domain name must be registered with a registrar other than Alibaba Cloud  for more than 60 days.
    • The domain name should not be in the clientUpdateProhibited, serverUpdateProhibited or clientHold status.
    • Your domain name should not be in dispute, under arbitration, or restricted by a court of law.

    When international domain names like .com, .net and .org are transferred to Alibaba Cloud your(domain name registrant) email address must be working and verified. Then follow the below given procedure.

    • Check your domain name at your registrar before transferring it to Alibaba Cloud.
      • Modify the contact information if required so that all the upcoming confirmation emails related to the transfer can be sent to the email address of the new administrative contact.
      • Remove clienthold status from the domain name if required.
      • If your domain name is enabled with prohibition of domain name transfer out of Alibaba Cloud, then you will need to disable that function.
      • Obtain a transfer code, which can also be called as transfer key, transfer password or domain name password.
    • Log on to the Alibaba Cloud Domain console.
    • In the left-side navigation pane, select Domain Transfers-In > Transfer Domain Name In.
    • Enter your domain name and transfer key, then click Submit.
      If you are transferring domain names to Alibaba Cloud in bulk then
      • Put a domain name and its transfer key in a row, separate it with a space. Follow the same rule for other domain names.
      • At maximum, 50 domain names can be transferred to Alibaba Cloud at once.
    • Select a profile template and click Next. When you transfer a “.cn” domain name to Alibaba Cloud, you must select a profile template that has passed real-name authentication. For more information related to real-time authentication visit
    • Check the amount and proceed to pay. The system will automatically verify whether your transfer key is correct. After successful verification, the domain name will start to transfer to Alibaba Cloud. This process may take up to 7 days.

    How to check the transfer status?

    • Log in to the console of Alibaba Cloud Domain.
    • You can check the transfer process in the left navigation panel > Domain Transfers-In. 

    You can find the detailed information in the following link:

  2. If you want to transfer domain to Mainland China platform then  you need to follow some set of rules:
    • The domain names with real and legal characters can be transferred.
    • Domain name transfer can only take place after 60 days of domain name registration and  15 days before the domestic domain name expires.
    • The domain name status is forbidden to transfer or clienthold cannot be transferred.
    • Domain names cannot be transferred in disputes, arbitrations or court restrictions.

    The transfer process can be done by following the steps below:

    Smooth migration before transfer:

    • Set up domain name resolution in Alibaba Cloud. Non-Wan domain names can also use the Cloud Resolution. 
    • Modify the domain name DNS at the original registrar and change the DNS of the domain name accordingly.
    • Ask the original registrar to transfer and get the domain transfer password. 

     Submit transfer:

    • Fill in the domain name and transfer the password. It supports batch transfer (200 / time). You must choose the “real-name authentication” information template.
    • You have to pay domain transfer price of 1 year renewals.
    • In response to the requirements of ICANN’s temporary specifications , the email verification authorization confirmation is temporarily cancelled; the domain name review is entered. After the naming review is passed, the domain name begins to be transferred.
    • The system verifies the transfer password: if the verification is passed, the domain name starts transferring to Wanwang; if the verification fails, you have to log into the management console-transfer to the domain name list and follow the processing status in time.
    • The successful transfers take approximately 5-7 days to process, depending on how quickly the original registrar confirms the transfer.

     Verify transfer after successful completion:

    • After the new domain name is successfully transferred, you need to log in to the domain name console and complete the domain name information in time by performing the domain name owner change (transfer) operation.

     You can find the detailed guidelines for domain transfer to Mainland China from the link:

  3. Once you are done with the process of transferring the domain thus you can check the status of the domain from this link:

Domain Mapping

Domain Mapping is the most important and crucial part. DNS servers create a DNS record that provide information regarding a domain name or hostname, especially its current IP address. A Records are the type of DNS record. An A record maps a domain name to computer’s IP address which is hosting the domain.

Navigate to Alibaba Cloud DNS from your console. The Following screen will appear

Click on Add Domain Name

If you click on Confirm, you will see a somewhat similar screen compared to below screen. You will have to add a new record if you are using a new domain.

Click on the Add Record and you will see the following screen

Here, “A” stands for Address. When you are adding an A record, you are mapping the IPv4 address of the Instance with the Domain Name. You can also have multiple  A records for the same Domain Name.

“CNAME” stands for Canonical Name. As the name implies, it is used to map the canonical name to the Domain. 

The detailed guidelines to map the domain are given in the below link:

Until now, it is assumed that your server would be up and running with the mapped domain.

Generating CSR

Next comes the setup of SSL(if required). If you are integrating online payments to your website you will need to consider cloud security products in order to protect against attacks like DDoS (Distributed Denial of Service) and other common attacks. So, SSL is a necessary step that needs to be implemented.

    1. The first step to implementing SSL is generating CSR (Certificate Signing Request). Before applying for a digital certificate, you must first generate the private key of the certificate and a CSR file. The CSR file is The source file of your public key certificate is the CSR file and it contains information about your organization and server. The private key is generated along with the CSR that is created. The privacy and security of the private key must be maintained. To generate the CSR certificate for apache server, you need to follow the steps below:
        1. Log into the terminal of your server (SSH).
        2. Type the following command in the prompt:-

          For example: ( openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr )

        3. Enter the asked information:

          Organization name: the name that is legally registered for your business.

          Organization Unit: enter the DBA name, if applicable.

          Common Name: full domain name/URL that you are securing.

          Locality: name of city or locality where the organization is registered.

          State/Province: name of state/province where the organization is registered.

          Country: Two-letter country code from where the organization is registered (the ISO format).

        4. Copy the text by opening the CSR in the text editor.
        5. Paste the copied CSR into SSL enrollment in your account.

      You can get further details for generating CSR from the links below: and

    2. After you generate CSR, you will need to verify it through various methods that are provided by the SSL provider. For this validation method you will  need to create a certain CNAME record in the DNS Manager settings of your domain from the Alibaba Cloud Console. The values for CNAME record will also be available in your account after the order is submitted for activation to the CA.

      You can get the detailed information from the link below:

      From the link below, you can gain the details to configure cname records from the console of Alibaba Cloud:

    3. Once the CSR is verified, SSL certificate will be issued by the provider on the registered email address.

Deploying SSL in Apache server

If your server is an apache server thus you need to deploy SSL certificate.  

      1. In apache2 directory, execute the command to create ssl directory.
mkdir /etc/apache2/ssl 
      1. Execute the below command to copy the downloaded certificate file to ssl directory.
cp -r YourDomainName_public.crt /etc/apache2/ssl
cp -r YourDomainName_chain.crt /etc/apache2/ssl
cp -r YourDomainName.key /etc/apache2/ssl
      1. Execute the below command to enable the SSL module.
sudo a2enmod ssl
      1. You can execute the command
ls /etc/apache2/sites-available
      1. after the SSL module is enabled and view the created file named default-ssl.conf in the directory.

You can find further details from the link below:

    1. The next step would be to change some settings in your server config file(I am assuming here the server to be apache, thus you can edit the configuration file through this command nano /etc/apache2/sites-available/000-default.conf. In this file you can see the setting for default port i.e 80, so you need to add for SSL port as well which is 443. You just need to add the below lines and replace the path of the files(key and certificates) accordingly. I have placed my files inside the SSL folder.
<VirtualHost *:443>

DocumentRoot /var/www/html

SSLEngine on

SSLCertificateFile /var/www/ssl/xyz.crt

SSLCertificateKeyFile /var/www/ssl/xyz.key

SSLCertificateChainFile /var/www/ssl/xyz_bundle.crt

<Directory /var/www/html>

        Options Indexes FollowSymLinks MultiViews

        AllowOverride All

        Require all granted


    1. By default, .htaccess isn’t available. Inorder to redirect your site by default open on HTTPS, you need to enable  .htaccess file. In order to enable it you will need to edit the configuration file. The steps are:
      1. Use a text editor to open your file. sudo nano /etc/apache2/sites-available/000-default.conf
      2. After the VirtualHost() block, you need to add the following code
<Directory /var/www/html/>

Options Indexes FollowSymLinks

AllowOverride All

Require all granted

      1. Save the file and then restart the apache.

Other Alibaba Cloud Products

  • Object Storage Service (OSS) 

Alibaba provides storage services that allow you to store, archive and backup any amount of data in the cloud. This service is called Object Storage Service shortly known as OSS. This storage service that is provided by Alibaba is pretty much similar to the S3 bucket provided by Amazon Web Services  (AWS). OSS allows you to retrieve and store various unstructured data files including the text files, images and audio files, video files, etc. over the network regardless of time and location.

Alibaba provides API and SDK interfaces to migrate massive data into Alibaba Cloud OSS. There are various concepts for storage provided by Alibaba Cloud OSS. They are Bucket, Object, Region, Endpoint and AccessKey. The steps to create a bucket from Alibaba Cloud Console are as follows:


A bucket is a type of container for objects that are stored in OSS.

  • To create a bucket you can need to log into the Alibaba Cloud console > OSS. A dialogue box will appear from where you can create a dialogue box.  
  • Enter the bucket name. It must be unique and it can not be changed after the bucket is created. 
  • Select the data center of the bucket from the Region dropdown list. This can not be changed once the bucket is created. If you need to access OSS through intranet, select the region where your ECS is residing. 
  • Three types of storage classes are provided: Standard, IA, and Archive. 
  • Storage: It supports frequent data access. 
  • IA (Infrequent Access): it is suitable for storing data that is not frequently used and is stored for a long time. 
  • Archive: the data over here is stored for a long period of time ( more than half a year)
  • Select the desired Access Control List, server-side encryption, and real-time log query and click OK to create your bucket. 

You can find various methods to create a bucket from the link given below:


  • Select the name of the bucket where you want to upload an object.
  • Click Files > Upload. An upload dialogue box will appear on the screen.
  • Under Upload to section, set directory to which the object needs to be uploaded. Selecting the Current option will upload the object in the current directory. If you select the Specified option, then you need to specify a directory. The OSS will automatically create the corresponding folder and upload the object to that folder.
  • From the File ACL section, select the ACL of the object that is to be uploaded. By default, an object will inherit the ACL of the belonging bucket.
  • In the Upload section, you can drag one or multiple objects to be uploaded to the Upload section.
  • While uploading an object, you must keep in mind that if the same name object already exists in the bucket, it will be overwritten.

You can find various methods to upload the object from the link below:


  • In order to download an object, navigate to OSS Console > bucket list ( select the name of the bucket you created) > Files tab > select name of the object and click Preview. 
  • In the preview page, you will find the following options: Download, Open file URL, Copy file URL and Copy file Path. 
  • To download multiple objects at a time, navigate to Files, select multiple objects, and select Batch operation > Download.
  • In order to download one object at a time, navigate to Files, select an object, select More > Download.

You can find various methods to download the object from the link below:


  • In order to delete an object from the bucket, navigate to the bucket name list from the console.
  • Select the name of the bucket from which you want to delete an object. 
  • Click on Files, select one or multiple objects, and click Delete. This will open the Delete File dialogue box. Click Ok to delete. 

You can find various methods to delete the object from the link below:


  • Before deleting the bucket, make sure that all the objects in the bucket are deleted. 
  • From the bucket list, select the name of the bucket you want to delete. 
  • Click on Basic Settings. From Bucket Management, click on delete bucket. A dialogue box will appear. Click Ok to delete the bucket.

You can find various methods to delete the bucket from the link below:

  • The above-mentioned methods are helpful when you want to manage the buckets and objects from the Alibaba Cloud Console. These methods are not useful when you need to manage the objects or buckets from your codes. 
  • For that, Alibaba Cloud provides SDKs and APIs for the developers. The codes to use OSS PHP SDK to perform routine operations like creating a  bucket, object uploads, and object downloads, deleting objects, deleting bucket, etc. can be found from the link below:

In order to access the buckets present in OSS, AccessKey ID and AccessKey Secret are necessary.

  • To obtain these keys, log into your Alibaba Cloud Console. From the avatar in the upper right corner, select accesskey from the dropdown 
  • A dialogue box of Security Tips will appear on the screen. 
  • From the Security Management page, you can create an AccessKey or find an existing AccessKey. Then, obtain the AccessKey ID and AccessKey Secret of your Alibaba Cloud account.

You can find different methods to obtain AccessKey ID and AccessKey Secret  from the link below:

The identity of request sender is done by using the AccessKey Id or AccessKey Secret by the method of symmetric encryption. The AccessKey Id is used by the OSS to identify the user. The AccessKey Secret is used for signature encryption by the user and it is used by the OSS to verify the signature. The AccessKey of Alibaba Cloud account has permissions to access its resources. 

In order to send a request to the OSS as a user, a signature key is generated in a specific format. That signature key must be encrypted by you using your AccessKey Secret. This will generate a verification code. After the request is received, OSS finds the AccessKey Secret based on the AccessKey Id and then extracts the signature string and verification code in the same manner.  If the verification code that is calculated is the same as provided verification code, the OSS determines that the request is valid. Else, OSS rejects the request.

  • ApsaraVideo for VOD

The other product I used was ApsaraVideo for VOD. ApsaraVideo for VOD provides on-demand audio and video streaming solutions. It transcodes the uploaded, edited and collected audio/video files based on transcoding settings. It provides web-based consoles, APIs and SDKs like player SDK and upload SDK. In order to activate the ApsaraVideo VOD, you need to purchase it from the Alibaba Cloud Website. After you’ve purchased the plan, you can log into ApsaraVideo VOD console and start using the service. 

You can upload your videos from the video upload function from the ApsaraVideo for VOD console. You can upload multiple audios, videos and image resources at the same time. In order to upload the video, follow the steps given below:


  • Navigate to Media library > video page > upload video
  • On the upload media page, select the local video which you need to upload and click the Upload button.  
  • You can add more videos if required or can cancel the process of uploading videos.


You must complete the transcoding setting before uploading the video. The transcoding templates are available and you can select any one of them to process single or multiple videos. The Standard HLS Transcoding templates were used in this case. If not, the default template is selected for transcoding. Check the configuration and management if you are uploading the video for the first time. All future videos will be transcoded as per your selected transcoding template. You can configure different definitions, customized resolutions, bit rates and watermarks.     


  • You can set the title and category for your video before uploading it to the server. Multiple video files can be selected and can be added to one category. You can modify the video category from the video details page after the video has been uploaded.
  • You can create a category from the categories page before uploading the video so that you can select a category for the video when uploading it.


  • To upload a video, you will need to select the storage address. If there are multiple storage addresses available, then the default storage address will be selected. 


  • The system will start uploading the video file once you click the Upload button. 

  • You can view a list of all the videos that are being uploaded. 
  • To stop a video from uploading, you can click the Cancel from Action column. 
  • If the video uploading task is stopped or failed for any reason, you can resume the task by clicking the Upload Again button. The system will restart uploading the video.
  • You can view all the uploaded videos from the Media Library. The system begins to transcode and process these videos. 

You can find the list of supported extension formats and other details for uploading a video from the following link:

  • Media Processing

The drawback for using this product was, everything was to be managed by the console interface that is provided by Alibaba Cloud. My requirement was to upload the video from the custom admin panel with compression and processing made on video. So MPS(Media Processing Service) was selected. With the help of this, any large video was divided into small files and stored on OSS so that the end-user while viewing the video doesn’t experience buffering. You can integrate the Java, .Net, PHP, Python, and NodeJS SDKs into your code.  The source code and examples for SDK integration are given in the links below:

I hope by this time, your server has been all set and running successfully. The purpose of this blog is to make the task a bit easier for the developers who are looking forward to work with the China market and Alibaba Cloud.

There are options like hosting from your own country or using CDN but if you are serving the audience in China then, these options will slow down the loading speed of your website and the search engines of china will not treat your website as a local website.

The best option for your audience in China is to host your website in Mainland China with Alibaba Cloud service. It will definitely reflect in SEO ranking of your website as your website will appear as a local website for the search engines in China. The process and steps for Alibaba Cloud server setup for Mainland China and International platforms are different.

Our team had faced lots of challenges and had referred every possible website, resource and contacted their support team to setup Alibaba server and make it work for our client. Alibaba Cloud policies are changing frequently so I hope by the time you are reading this blog, their policies may not have changed.

Bhargav Bhanderi
Bhargav Bhanderi

Director - Web & Cloud Technologies

Launch your MVP in 3 months!
arrow curve animation Help me succeed img
Hire Dedicated Developers or Team
arrow curve animation Help me succeed img
Flexible Pricing
arrow curve animation Help me succeed img
Tech Question's?
arrow curve animation
creole stuidos round ring waving Hand

Book a call with our experts

Discussing a project or an idea with us is easy.


Love we get from the world