Welcome to Admin Junkies, Guest — join our community!

Register or log in to explore all our content and services for free on Admin Junkies.

301 redirects

Joined
Sep 15, 2012
Messages
1,453
Credits
362
Ok, so one of my sites is going to be going through a domain change. I have already added the domains to Google's Webmaster tools to use their "Change of Address".

Now what I'm going to have to do prior is use the .htaccess to redirect EVERY page from the old domain to the new one. Does anyone have the slightest idea how to do this?
I never had to do it before lol.
 
Advertisement Placeholder
Make an .htaccess file with the following in it:

Code:
RewriteEngine On
RewriteRule ^(.*)$ http://newdomain.com/ [R=301]

Should work (obviously replace the domain with yours.

Let me know how it works out!
 
Now will this make every link on my site go to the right one on the new site?

Example if i want my domain.old/some-blog-post,

does that make it redirect to just domain.new or will it go to domain.new/some-blog-post

From what I understand, it will redirect to the full url. Just try it... if it doesn't work its as simple as removing the code.
 
Well everything should be working as expected then,

Ridiculous Facts has been moved from the .org domain to the .com domain. Along with all web master tools now using the new one.

Now time for me to go to every single post I made about the site in every single forum and edit every single link :p Oh the joys of being a web master
 
Well everything should be working as expected then,

Ridiculous Facts has been moved from the .org domain to the .com domain. Along with all web master tools now using the new one.

Now time for me to go to every single post I made about the site in every single forum and edit every single link :p Oh the joys of being a web master

So, the above worked?
 

Log in or register to unlock full forum benefits!

Log in or register to unlock full forum benefits!

Register

Register on Admin Junkies completely free.

Register now
Log in

If you have an account, please log in

Log in
Who read this thread (Total readers: 0)
No registered users viewing this thread.

Would You Rather #9

  • Start a forum in a popular but highly competitive niche

    Votes: 9 27.3%
  • Initiate a forum within a limited-known niche with zero competition

    Votes: 24 72.7%
Win this space by entering the Website of The Month Contest

Theme editor

Theme customizations

Graphic Backgrounds

Granite Backgrounds