I want it so that when people type in domain X (which is connected through digital ocean) that they instead come to domain Y (which I have set up on webflow) Anyone that can explain easily to me as I am not so experienced. Many thanks!
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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Heya,
The easiest way will be to set a CNAME record to handle the redirect for you.
CNAME stands for Canonical Name and is used to alias one domain name to another. Set the CNAME record’s name or host field to
www
(if you want to redirect www.domainX.com) or leave it blank if you want to redirect the root domain (domainX.com). Then, set the value to the domain Y provided by Webflow. This might look something likeproxy.webflow.com
.Keep in mind that the DNS will need some time to update, this can take from a few minutes to 48 hours, mainly due to DNS cache.
Regards
Heya @emillundvall,
There are a couple of ways to do this,
Method 1: Using A and CNAME Records
If URL forwarding is not available:
A
record of Domain X to point to the IP address of the server where Domain Y is hosted (this information is available in your Webflow account).www
in your domain (like www.example.com), then set up aCNAME
record forwww
to point to Domain Y.Method 2: Using WebService and a Droplet
Let’s assume you are using Apache.
Installing and configuring Apache to set up a redirect involves a few steps. I’ll guide you through a basic setup. This guide assumes you have some access to a server where you can install software and edit configuration files. If you’re not comfortable with command-line operations and server management, you might want to seek assistance from someone who is.
Step 1: Install Apache
The installation process varies depending on your operating system. Here’s how you do it for Ubuntu and CentOS, two common Linux distributions.
For Ubuntu:
sudo apt update
sudo apt install apache2
For CentOS:
sudo yum update
sudo yum install httpd
Step 2: Start Apache and Enable it to Run on Boot
For Ubuntu:
For CentOS:
Step 3: Configure Apache for Redirection
You’ll need to edit the Apache configuration files. Typically, these are located in
/etc/apache2
(Ubuntu) or/etc/httpd
(CentOS). The exact file to edit can vary. It could behttpd.conf
,apache2.conf
, or a site-specific file undersites-available
.nano
orvim
. For example:<VirtualHost *:80>
block if one exists, or at the end of the file.Replace
domainX.com
with your original domain anddomainY.com
with the domain you want to redirect to.Save the file and exit the editor (
Ctrl + X
, thenY
, thenEnter
for nano).Step 4: Restart Apache
To apply the changes, restart Apache.
For Ubuntu:
For CentOS:
Step 5: Testing the Redirect
After restarting Apache, test the redirect by visiting Domain X in your web browser. It should automatically redirect you to Domain Y.
Additional Tips:
<VirtualHost *:443>
block in the Apache configuration./var/log/apache2/error.log
(Ubuntu) or/var/log/httpd/error_log
(CentOS).Remember, server and network configurations can vary widely, so some steps may need to be adjusted to fit your specific environment.