Mobile app version of vmapp.org
Login or Join
Carla537

: 301 redirects, site files Is it possible to have a 301 redirect without moving files? I have a site currently at a .ca domain. Now I want the primary domain to be .org. I would like to

@Carla537

Posted in: #301Redirect #Domains #MultipleDomains

Is it possible to have a 301 redirect without moving files?

I have a site currently at a .ca domain.

Now I want the primary domain to be .org. I would like to do this in a way that is search engine friendly. I have been told I can do this with 301 redirects.

Is it necessary for me to move my files over to another server / folder or can I just write the 301 redirects so that the URL changes to the preferred .org domain?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Carla537

2 Comments

Sorted by latest first Latest Oldest Best

 

@Angie530

Yes! It is possible to have a 301(Permanent redirect) without moving the files to the new location.

301 redirection can be achieved using your hosting control panel(for example cPanel) or using the .htaccess file.

You can use the code provided by @w3d in order to achieve this.

You can use the following code in the .htaccess file if you wish to have a stealth redirecton(URL Masking).

RewriteEngine on
RewriteCond %{HTTP_HOST} ^testdomains.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.testdomains.com$
RewriteRule ^(.*)$ "http://www.example.com/Test Domains" [P,L]


URL masking will ensure that your visitors see the source URL and not the destination URL.

10% popularity Vote Up Vote Down


 

@Alves908

A 301 (moved permanently) redirect is an instruction to the user that the file that is being requested has moved to a different location. The result is that the browser requests the file located at the new location.

If you currently have a site at example.ca but wish to use example.org instead (without moving any files) then you will first need to setup example.org as a parked domain on your hosting account (providing your webhost supports this). Your site would then be accessible by both domains.

To solve the duplicate content issue and set example.org as the primary domain for your users then set up a 301 redirect from example.ca to example.org in .htaccess:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.ca [NC]
RewriteRule (.*) example.org/ [R=301,L]


If the requested HTTP_HOST is "example.ca" then 301 redirect the request to "example.org".

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme