大网数据广告活动
网站运营与故障问答

Managing redirections of 2 domains at CloudFlare for the same site

· 52CE 我爱测

Let's say I have these two domains: example.com.uy example.uy My goal is to set a proper domain's forward according to SEO best practices using a 301 Redirect, in order to enforce my users to be always browsing my site at www.exa…

问题原文

原帖链接 · Frondor · CC BY-SA 3.0

Let's say I have these two domains:

  • example.com.uy
  • example.uy

My goal is to set a proper domain's forward according to SEO best practices using a 301 Redirect, in order to enforce my users to be always browsing my site at www.example.com.uy, even when they come from example.uy and keeping the rest of the URL just like /cat/item/1?qwe=rty.

I'm using CloudFlare with their free package, their Page Rules seems to be what I need but I can't figure out how to properly set the forwarding. Perhaps I need to configure something at my domain registrar panel as well.

An example of the kind of redirection I want to achieve is:

  • http://example.uy/cat/item/1?qwe=rty>http://www.example.com.uy/cat/item/1?qwe=rty

Sub domain example:

http://shop.example.uy/cat/item/1?qwe=rty>http://shop.example.com.uy/cat/item/1?qwe=rty

I have tried:

  • example.uy/*
  • Forwarding to: http://www.example.com.uy/$1
  • Forwarding type: 302 Temporary

Sadly this is without success, because my .uy domain has no settings yet, simply because I don't know if I should use the same data I've used previously for .com.uy.

So the actual state is:

已采纳解答

原帖链接 · Ricardo Umpierrez · CC BY-SA 3.0

The way that I do is, add the two domains to cloudflare, redicted it normally to the hosting. On the hosting cpanel, add both domains, and set on cpanel that this site redirect permanent to your main site, so if any day has to change something, is only on the web provider end.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2016-03-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。