AdminsForum

aaPanel

Guide aaPanel: Create Your First Website, Connect a Domain, and Enable SSL

Started by DEV 0 replies 122 views
1DEV
#1
How do you put your first website online with aaPanel?
Create the site with the correct domain and document root, confirm DNS points to the intended server, and verify a simple HTTP page. Then issue a certificate for the configured names, test HTTPS, and enable redirects only after it works. Put a small website online, prove that the domain reaches the correct server, then enable HTTPS. Start with a test subdomain if your main domain already serves a live business.

New to the panel? Read our aaPanel introduction and FAQ. This walkthrough assumes aaPanel is already installed and reachable. Interface labels can vary by release. Documentation reviewed 9 October 2026. Fresh-VPS testing and original screenshots are pending; the existing images are vendor documentation examples, not evidence of a tested server. Record the exact aaPanel, OS, web-server and PHP versions when following this walkthrough.

1. Prepare before changing DNS
You need a domain you control, its DNS dashboard, your VPS public IP, and a working web server in aaPanel. For PHP applications, install a supported PHP version compatible with the application. A static HTML test does not need a database.

If replacing an existing site, record its current DNS values and back up files and databases first. Keep the old host working during the change. Changing DNS can send some visitors to the old host and some to the new host while caches expire.

2. Point the domain to the VPS
Edit records at the provider hosting your authoritative DNS zone; this may differ from the registrar where you bought the domain.
Code:
Type    Name    Value A       @       YOUR_VPS_PUBLIC_IPV4 CNAME   www     example.com
Replace example.com and the IP placeholder with your own values. Some providers require the full domain instead of @. Do not create a CNAME where other records already exist for that same hostname. Leave mail records alone.

Check both names from your computer, if dig is installed:
Code:
dig +short A example.com dig +short A www.example.com dig +short AAAA example.com dig +short AAAA www.example.com
An AAAA record advertises IPv6. Keep it only when that address actually serves this website. An old IPv6 record can cause failures even when the A record is correct. With a CDN proxy, public answers may show the CDN rather than the origin; check the configured origin separately.

For more background: DNS Records Explained.

3. Create the site in aaPanel
Open Website → PHP Project → Add site → Create site. Enter your domain and, if needed, www on separate lines. Check the site-specific Website Path, choose the appropriate PHP version, and create FTP/database accounts only if needed. Confirm the form. For this staged test, leave Apply for SSL off until HTTP works.

Official aaPanel documentation example; your version may look different. The PHP selection shown is illustrative, not a requirement for your application.
[Image: Createsite.Bk5m6BH_.png]

4. Prove that the right files are being served
Open the site's directory through aaPanel Files. In a new empty test site, create index.html containing:
Code:
<!doctype html> <html lang="en"> <meta charset="utf-8"> <title>My first website</title> <h1>Website setup works</h1> <p>This is my new VPS website.</p> </html>
Do not overwrite an existing application's index file. Visit http://example.com and http://www.example.com and confirm the exact test text appears. If you see another page, fix DNS or the domain binding before requesting a certificate.

Optional read-only checks from your computer:
Code:
curl -I http://example.com curl -I http://www.example.com
A response alone does not prove the correct site was served; also check the page content. Upload application files only to the intended site directory, following that application's deployment instructions. Keep backups, private keys and database exports outside the publicly served directory.

5. Issue the website certificate
Open the site's SSL → Let's Encrypt settings. Select the hostnames you actually configured, choose File verification and Apply. HTTP-01 needs public access on port 80, including through the provider firewall. HTTPS traffic needs port 443. Keep administration ports restricted; do not disable the whole firewall.

Official aaPanel SSL example. Despite wording visible in this example, HTTP file verification cannot issue wildcard certificates.
[Image: Fileverification.1EuYUWO5.png]

A wildcard requires DNS verification. Manual TXT verification needs ongoing renewal work; it is not automatically renewed by aaPanel's documented manual method. Automated DNS verification should use narrowly scoped credentials where supported. Never post those credentials in a support thread.

6. Test HTTPS before redirecting
Visit https://example.com and the www address. Verify the certificate covers both names and the correct content loads. Do not bypass a browser certificate warning to declare success.
Code:
curl -I https://example.com curl -I https://www.example.com
These checks use normal certificate validation; do not add -k. Only after HTTPS works should you enable the site's Force HTTPS option, if available. Test again for redirect loops and insecure image/script requests. Delay HSTS until you understand its persistence and all affected hostnames reliably support HTTPS.

7. Troubleshooting without guesswork
  • Wrong site: Compare DNS answers, domain bindings and the selected document root. Opening the bare IP can show a default site instead of your domain's site.
  • Timeout: Check whether the web service is running and whether the provider and server firewalls allow the needed web ports. Keep your current administrative session open when adjusting rules.
  • 403 or 404: Confirm the index file and public directory. Use the site's error log to diagnose permissions; do not use chmod 777 as a shortcut.
  • Certificate validation fails: Read the exact error. Check A/AAAA, port 80 reachability, proxy behavior and the challenge path. Fix the cause before retrying repeatedly, because issuance has rate limits.
  • Redirect loop: Check application URL settings and CDN/origin HTTPS configuration. Avoid competing redirect rules at several layers.
  • PHP returns 502: Check the site's selected PHP service and logs. See our aaPanel PHP-switching 502 guide.

8. Make the setup maintainable
Confirm the renewal job is enabled and monitor expiry rather than assuming the first successful issuance guarantees renewal. Schedule backups, keep an off-server copy and test restoration into a separate destination. Record the domain, document root, application version and recovery steps without putting passwords in that note.

Done means: Both intended hostnames serve the correct site; HTTPS validates; redirects behave as intended; renewal is monitored; recovery has been tested.

References and screenshot credits: aaPanel website and SSL documentation; aaPanel deployment guide; Let's Encrypt validation methods. Screenshots are vendor documentation examples, not captures of your server.

Common questions
Do I need a database for the first HTML test?
No. A static index.html page checks domain mapping and file serving without involving PHP or a database. Add those only when your application needs them.

Can HTTP file verification issue a wildcard certificate?
No. A wildcard needs DNS-01 validation. Follow the current certificate-provider and aaPanel instructions for the chosen method.

Why does the site work for me but fail for someone else?
Compare A and AAAA records, DNS caching and CDN origin settings. A stale IPv6 record can point some visitors to another server.

Related setup and troubleshooting
Reply
Possibly Related Threads…matched by title
Replies:0Views:110

Users browsing this thread: 1 Guest(s)
Forum Jump: