Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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 '09 at 13:28
2  
This question might be more appropriate for Server Fault. –  Rob H Oct 10 '09 at 13:30
add comment

migrated from stackoverflow.com Oct 12 '09 at 11:20

This question came from our site for professional and enthusiast programmers.

3 Answers

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

share|improve this answer
add comment

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

share|improve this answer
add comment

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.