Score:1

Redirect a subdomain to a different subdomain using host records

cn flag

I have two domains example.com and example2.com; the second domain is simply to catch a common misspelling of my name and I want to redirect everything on it to example.com.

I have a number of subdomains set up on example.com and I want to redirect urls at example2.com to the appropriate subdomain on example.com. I have seen solutions for this using htaccess but I do not want to create an actual site on a server for example2.com so I want to do it through host records.

Here is an example of what I have done so far on example2.com (I am using Namecheap):

Type Host Value
URL Redirect Record @ https://example.com Permanent (301)
URL Redirect Record mysd https://mysd.example.com Permanent (301)

The root domain redirect is working fine but subdomains are also redirecting to the root i.e. mysd.example2.com goes to example.com instead of mysd.example.com.

What do I need to change here?

in flag
Well, because you configured it to redirect to the root. Configure the desired subdomain instead.
mharran avatar
cn flag
@GeraldSchneider - Sorry, I had it configured ok in Namecheap, I mistyped above and have now edited the original post.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.