Report this

What is the reason for this report?

How to redirect someone to another site when searching a specific site

Posted on March 14, 2014

I’ll try to explain this as easy as i can. Say someone goes to example.com i want them to get redirected to test.example.com. It’s the same domain but it just goes to text.example.com.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi, <br> <br>The simplest way to redirect people would be to just create a dns cname record for example.com redirecting to test.example.com. Please note you would need to make an a or aaaa record at example.com for the redirection to go anywhere.

Adding an A/CNAME record isn’t enough – you also need to configure your webserver to actually redirect users from example.com to test.example.com.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.