BT Panel Redirect Configuration Guide
BT Panel (also known as aaPanel internationally) lets you configure redirects through a point-and-click interface โ no need to write Nginx or Apache config by hand. That said, knowing where to find the redirect settings and how to troubleshoot when things go wrong is still essential.
Method 1: Visual redirect tool (recommended)
BT Panel has a built-in redirect feature inside the site settings.
Steps
1. Open site settings โ Log in to BT Panel, go to Website, find your site, and click Settings.
2. Find the Redirect tab โ In the settings dialog, click the Redirect tab.
3. Add a redirect rule โ Click Add Redirect and fill in:
- Type โ 301 (permanent) or 302 (temporary)
- Domain โ the source domain
- Redirect mode โ whole-site or path-based
- Target URL โ where to redirect to
Common scenarios
HTTP โ HTTPS
The easiest way: go to the SSL tab and toggle Force HTTPS. BT Panel configures the redirect automatically.
non-www โ www
- Type: 301
- Domain: example.com
- Mode: whole-site redirect
- Target:
https://www.example.com
Old domain โ new domain
- Type: 301
- Domain: old-domain.com
- Mode: whole-site redirect
- Target:
https://new-domain.com
๐ก Under the hood
BT Panel's visual redirect tool writes Nginx or Apache config rules behind the scenes. If you're comfortable with config syntax, you can edit those files directly for more flexibility.
Method 2: Edit the config file directly
In site settings, click the Config tab to edit the Nginx config directly.
Nginx example
# Force HTTPS
server {
listen 80;
server_name example.com www.example.com;
return 301 https://$host$request_uri;
}
# Specific path redirect
server {
listen 443 ssl http2;
server_name example.com;
location = /old-page {
return 301 /new-page;
}
}
Apache (.htaccess)
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
โ ๏ธ Don't mix methods
Don't use both the visual redirect tool and manual config edits for the same site โ they can conflict. Pick one approach and stick with it.
Troubleshooting
Redirect not taking effect
- Clear browser cache or test in a private window
- Clear CDN cache if you're using one
- Check for syntax errors in the config
- Look for conflicting rules
Redirect loop
Usually caused by duplicate rules โ e.g., both the visual tool and a manual config entry doing the same redirect. Remove one.
Check the logs
# Nginx access log
tail -f /www/wwwlogs/your-domain.log
# Nginx error log
tail -f /www/wwwlogs/your-domain.error.log
Test with curl
curl -I http://example.com
curl -IL http://example.com
Or use 301check.com to see the full redirect chain with all details.
Best practices
- Use the visual tool for simple redirects โ it's less error-prone
- Edit config files directly only when you need something the UI can't do
- Back up your config before making changes (the editor has a backup button)
- Test after every change
- Audit redirect chains periodically โ migrations accumulate chains over time