0

I've got two sites (example1.com and example2.com). I'd like to forward example1.com to example2.com/example1. Is there a way of doing this with just DNS? I know I could set up hosting for both domains and then just use a HTTP redirect, but I'd rather just have one hosting account. I'm with NearlyFreeSpeech if that helps.

2
  • I don't think so no. It is possible that you could do something just with DNS provided your web server supported it, but I don't know of anything that does that.
    – Nick Craig-Wood
    Oct 10, 2009 at 13:28
  • 2
    This question might be more appropriate for Server Fault.
    – Rob H
    Oct 10, 2009 at 13:30

3 Answers 3

3

Not with DNS alone because DNS only deals with host names, not paths.

1

Duplicate of many other questions. You should search before posting.

0

No, there is not. You need to use a rewrite or redirect to accomplish your goal.

In your Apache VirtualHost config for example1.com:

RedirectPermanent example1.com http://example2.com/example1

You must log in to answer this question.