SOLVED | how do i make my domain redirect to another website

SOLVED
4 Replies
Alexm
Alexm7d ago
Either use redirect rules, or if those don’t work, then just have a web server that redirects you to somewhere else. These would probably be the easiest to set up: Python(requires Flask):
from flask import Flask, redirect

app = Flask(__name__)

@app.route('/')
def home():
# Redirects to example.com
return redirect("https://example.com", code=302)

if __name__ == '__main__':
app.run(port=5000)
from flask import Flask, redirect

app = Flask(__name__)

@app.route('/')
def home():
# Redirects to example.com
return redirect("https://example.com", code=302)

if __name__ == '__main__':
app.run(port=5000)
node.js(requires express):
const express = require('express');
const app = express();

app.get('/', (req, res) => {
// Redirects to example.com
res.redirect('https://example.com');
});

app.listen(3000, () => {
console.log('Server running on http://localhost:3000');
});
const express = require('express');
const app = express();

app.get('/', (req, res) => {
// Redirects to example.com
res.redirect('https://example.com');
});

app.listen(3000, () => {
console.log('Server running on http://localhost:3000');
});
Chaika
Chaika7d ago
Cloudflare Docs
Redirect one domain to another
If you have an alias domain that only forwards traffic to another domain (that is, the domain does not have an associated origin server of its own), you can set up redirects directly within Cloudflare.
gia !?!?!?
gia !?!?!?OP7d ago
thank you!!! after searching found one lol
Alexm
Alexm7d ago
You’re welcome.

Did you find this page helpful?