Website Security Basics: Introducing Basic Website Security Measures

First, why is website security important?


Have you ever encountered such a problem:

- The site suddenly can not open, displaying abnormal pages?

- Customer information is leaked, and even false orders?

- The site was hacked into illegal advertising, Trojan horse or even by the search engine black?


These are the specific performance of the website security is not in place. In the era of digital economy, an insecure website may lose users or even face high compensation and brand damage.


Target audience (you may be):

- Website webmasters, who want to protect data security

- Operations and maintenance novice, first time to operate and manage an online website

- Ordinary users who want to understand common security measures to protect their rights and interests.




What are the threats to website security?


Many people mistakenly think that "I am a small site / novice site, will not be hacked", but in fact, all sites may become the target of hacker attacks. Below are a few categories to give you a sense of crisis:


1. Breach and Account Hacking

- Weak Passwords or Default Accounts Easily Breached and Backend Stolen


2. Data theft and information leakage

- User information, orders, cell phone numbers exposed and trafficked on the black market


3. Malicious tampering and page mounting

- Home page is altered into casino ads and malicious scripts are inserted into the site.


4. Denial of Service Attack (DDoS)

- A large number of spam requests in a short period of time, occupying the full bandwidth resources, website paralysis


5. Search engine downgrade (SEO security)

- Included in the garbage content, hanging black chain, resulting in the site in Baidu / Google downgrade or be pulled black




Third, the basic protection measures of website security (according to the importance and ease of use layered explanation)


Let's layer by layer and make each step solid.


1. Use strong passwords and restrict permissions


- Administrator / database / FTP and other passwords set to high strength (uppercase + lowercase + numbers + special symbols, ≥ 12 digits)

- Grant users only necessary permissions and disable unused default accounts

- Assign multiple levels of privileges as needed to prevent "all super administrators".


2. Regular backup and recovery mechanism


- Automatically and regularly backup website files and databases on a daily basis

- Keep multiple backups, cloud+local/offsite

- Test recovery process to ensure quick recovery in case of problems.


3. Timely updates and bug fixes


- Use the latest version of CMS, plug-ins and themes.

- Pay attention to official security announcements and fix high-risk vulnerabilities at the first time.

- Close unneeded functions and ports to reduce the attack surface.


4. Enable HTTPS (SSL certificate)


- HTTPS must be enabled for the entire website to avoid data theft during transmission.

- Free SSL certificates such as Let's Encrypt, paid certificates are available for enterprise sites (more trust)


5. Anti SQL injection and XSS attacks


- Parameterized query is used in the development phase and splicing of SQL statements is prohibited.

- Strict input validation for forms/URLs, filtering dangerous characters (e.g. <script>, "'")

- HTML escaping when exporting all user data


6. Defense against DDoS and CC attacks


- Use CDN acceleration (e.g. AliCloud, Tencent Cloud, Cloudflare, etc.)

- Enable server bandwidth/traffic alerts, set up WAF (Web Firewall)

- Set up black/white lists, flow limiting protection if you can afford it


7. Management background reinforcement


- Modify the default background login path, such as admin to a customized path

- Enable login authentication code, device identification, email/SMS double authentication

- Try not to log in the background in the public WiFi environment.




Frequently used table: Comparison table of basic website security measures and common threats


Threat type Basic security measures Examples of tools/methods
Weak password/blast attack Strong passwords + restrict IP login attempts + multi-factor authentication LastPass, Google Secondary Authentication
Data Loss/Tampering Automatic backup + recovery test Pagoda Panel, Cloud Hosting Snapshot
Data Leakage Input checksum + output escaping + sensitive information encryption OWASP tool, HTTPS
Website Hacking / Content Tampering Log Audit + File Change Alert + Web Firewall Pagoda Security, 360 Host Guard
DDoS attack CDN anti-attack + bandwidth expansion + WAF Cloudflare, Tencent Cloud Security
Vulnerability Exploitation Timely patching + use only mainstream genuine plug-ins/components Official website, upgrade scripts




Fourth, to strengthen the advanced recommendations for website security


1. Operation logs and monitoring

- All operations in the background should automatically record logs, with the ability to recommend real-time monitoring of key actions and early warning.


2. Regular security scanning and penetration testing

- Use security scanning tools (such as Green Alliance, ACE, etc.) of the "scanning one-key physical examination" to regularly check the virtual host and site building programs.


3. Employee Security Awareness Training

- Enterprise/team members need to popularize security knowledge, and regularly conduct preventive drills for phishing emails, social engineering, and so on.


4. Privacy and Compliance

- If collecting user privacy data, be sure to comply with (e.g., GDPR), encrypted storage of sensitive information, and provide exit and deletion channels.




V. Common Misconceptions about Website Security Maintenance and Q&A


Question Correct perception/suggestion
Small websites don't need security? In fact, attackers mostly use batch scanning, "small site" is also easy to become a springboard.
Is it safe to use CDN only? CDN can resist DDoS, but it can't replace back-end security.
Can I use free plug-ins? Only mainstream, highly reputable, regularly maintained plug-ins, fake / pirated plug-ins with backdoor
Backup is not important? As long as there has been an accident to understand that the backup is the only shortcut to disaster recovery





Six, the site security operation of the whole flow chart (can be used as an illustration)




A [account security settings] --> B [regular data backups]

B --> C [system and plug-in timely update]

C --> D[Enable HTTPS for the whole site]

D --> E [injection and XSS protection development]

E --> F [CDN acceleration / WAF protection]

F --> G[Backend Path Hardening & Monitoring]

G --> H[User Data Encryption & Compliance]

H --> I [regular audits and emergency drills]




VII. Conclusion: Security is the lifeline of a website, prevention is better than cure!


No matter how small your website is, how simple its purpose is, as long as it is connected to the Internet, it is a potential target of attack. Security has no end, only continuous investment and real-time protection, in order to protect the data and brand from loss. We recommend bookmarking this article and periodically checking your website's security measures to truly achieve "safe operation and maintenance, peace of mind".




1. OWASP Top 10 Vulnerabilities Guide

2. CSDN: Website Security Introduction and Protection

3. Aliyun Security Center - Website Security Solutions

4. Cloudflare website - security and DDoS protection