how to redirect all typo subdomains

Discussion Of All Legal Topics Is Fine Anything Goes. Be Respectful of Others. No Personal Information or Attacks.
All Traffic, Link, Banner, Push Notification and Advertising, Offers & Requests Here,.
Domains & Websites For Sale and Requests Here.
Keep One thread per person & No More Than 1 Weekly Bump.
Post Reply
Slim
Verified Member
Verified Member
Posts: 435
Joined: September 26th, 2018, 3:02 am

how to redirect all typo subdomains

#1

Post by Slim » February 5th, 2023, 8:47 am

This is confusing me how to redirect all subdomains that I have not setup on the server to another url.I fund this article but hell if I can get it to work. https://www.namecheap.com/support/knowl ... in-cpanel/
What am I doing wrong.




Cpanel in domains I have created *.mydomain.com and it shows as /public_html/wildcard
In zone editor I can not find *.mydomain

When I create the A record for *.mydomain in zone editor and save it still does not show up.
Some people can be Dumb and Dumber

User avatar
TheButcher
Administrator
Administrator
Posts: 17531
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#2

Post by TheButcher » February 6th, 2023, 8:20 am

The way I do it (might not be the best way) but it works for the longest time is I created a "*wildcard" subdomain and in that directory I added a .htaccess file with the one line of code

Code: Select all

RewriteEngine on
RewriteRule (.*) https://www.sponsorchat.com/index2.html/$1 [R=301,L]


you can test it here type any subdomain on sponsorchat.com it should redirect to that url

For example, slim.sponsorchat.com


Peace

Slim
Verified Member
Verified Member
Posts: 435
Joined: September 26th, 2018, 3:02 am

#3

Post by Slim » February 7th, 2023, 5:06 am

TheButcher wrote: ↑
February 6th, 2023, 8:20 am
The way I do it (might not be the best way) but it works for the longest time is I created a "*wildcard" subdomain and in that directory I added a .htaccess file with the one line of code

Code: Select all

RewriteEngine on
RewriteRule (.*) https://www.sponsorchat.com/index2.html/$1 [R=301,L]


you can test it here type any subdomain on sponsorchat.com it should redirect to that url

For example, slim.sponsorchat.com


Peace
It worked thanks for the code butcher
Some people can be Dumb and Dumber

how to redirect all typo subdomains

Post Reply