Mobile app version of vmapp.org
Login or Join
Reiling115

: What other choices do we have other than the 301 redirect and CNAME on DNS? I have a main site http://qweop.com, and I would like to add an alias to it called http://qwepo.com. Now if I

@Reiling115

Posted in: #301Redirect #Dns #Redirects

I have a main site qweop.com, and I would like to add an alias to it called qwepo.com.
Now if I use a CNAME (currently this is what I'm using) on qwepo which maps www to qweop.com, then when i go qwepo.com I will be shown the content from qweop.com
This is fine, however I want the browser address bar to show qweop.com instead of qwepo.com even if the user types visits qwepo.com and not qweop.com.
Now I've heard of the 301 moved permanently, but it seems like it's a solution for people who have a new url for their website (which is of course not in my case here).

What other choices do we have other than the 301 redirect and CNAME on DNS ?

Basically the end result is that whenever someone types qwepo.com/foobar it will bring them to qweop.com/foobar AND the address bar will show qweop.com/foobar

PS: is domain forwarding the same thing as a 301 redirect? is masking the same thing as a CNAME on DNS ?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Reiling115

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

Basically the end result is that whenever someone types
qwepo.com/foobar it will bring them to qweop.com/foobar AND the
address bar will show qweop.com/foobar


301 Permanent Redirect is EXACTLY what you need here.

That's what Wikipedia says about your case: en.wikipedia.org/wiki/URL_redirection#Similar_domain_names


If you web server is Apache, then this is the rule that will do such redirect (mod_rewrite is required):

RewriteEngine On

RewriteCond %{HTTP_HOST} =qwepo.com
RewriteRule .* qweop.com%{REQUEST_URI} [R=301,L]


If it is IIS 7.x, then use the following rule (using URL Rewrite module):

<system.webServer>
<rewrite>
<rules>
<rule name="Proper Domain Name" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="qwepo.com" />
</conditions>
<action type="Redirect" url="http://qweop.com{REQUEST_URI}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme