Need a new web host or having a problem with a script? Tips and advice on the best way to design, build and maintain your most valuable asset - your website!

Repercussions on changing url

covenantguy
Posts: 106
Joined: 08 Feb 10
Trust:

Repercussions on changing url

Hi
I'm a newbie and have got a friend hosting my site. When he set up the hosting for my (non AB) site he installed it into a directory called "blogwp", so that my Wordpress url ever after has been called "mydomainname.com/blogwp". Now I've got round this by setting up a 301 Redirect so that all posts and pages with that extension go to '`http://mydomainname.com`" and also I put `http://mydomainame.com` as the Blog url (because Wordpress gives you that option) and that's what appears in the web browser.
2 questions:1) I left out the "www" part of my domainname for the blog url so that you get (for example)"`http://johnsmith.com`" because I was told it isn't crucial to include it. If I go back and put "www" there will it mess up all my links etc?
2) How do I change things so that `http://www.johnsmith.com` becomes the url of the site AND all the links between posts (which have a Redirect already as I said) do not get messed up?

I tested one of my affiliate product links that has the code without the WWW in it e.g "http://johnsmith/recommends/acnecure" ,
and changed it to "http://www.johnsmith/recommends/acnecure"
and it still worked, so it makes me think it might not be too difficult. Am I right?

JOHN
  • 0
Last edited by sydney on 15 Jun 10 3:02 am, edited 1 time in total.
Reason: unlinked URL as it is only used for illustration and not an actual link
 

http://johnreason.com/recommends.php?linkid=Affiloblueprint
Build a Successful Website in 12 Weeks.
 
PremiumMember
jmpruitt
Posts: 3918
Joined: 19 Jun 09
Trust:
if you have hostgator, you can go in and set up a redirect to redirect the non www. links to the www. domain.
also, sign up for google webmaster tools, and you can select which version of your domain you want to show.
  • 0
Do you want to use your online content to Educate others, inspire them to action, and run a profitable business for yourself and your family? I can help you get started
https://www.youtube.com/channel/UCUvDlGM242pI2D5TUOCWd7A
 
esolutions
Posts: 475
Joined: 28 Apr 09
Trust:
Hi John,

Use this in your .htaccess to rewrite all urls the correct (seo friendly) way.


First, open your .htaccess file with a plain text editor such as notepad. Next copy and paste the following code into the .htaccess file;


Next, simply replace "yoursite" with your unique URL, save and upload. Now when somebody types in yoursite.com in their browser they will be automatically redirected to "http://www.yoursite.com" .
  • 0
Last edited by sydney on 15 Jun 10 3:00 am, edited 1 time in total.
Reason: unlinked URL as it is only used for illustration and not an actual link
 

List not growing fast enough?
Get More Opt Ins:
http://mattgreener.com/view/arfree
 
Site Admin
mikeantiga
Posts: 753
Joined: 28 Mar 10
Trust:
Also, don't forget to update the "WordPress address (URL)" and "Blog address (URL)", make sure you include "www" in the URL. Otherwise, it'll just create an endless redirect.
  • 0
Want lessons on Affiliate Marketing, SEO and Content Creation? Get them here for FREE:
http://www.affilorama.com/lessons
 
covenantguy
Posts: 106
Joined: 08 Feb 10
Trust:
Thanks chaps for all your answers.

I think the blog was originally set up with the Wordpress name: "http://johnsmith/blogwp"
I set up a Redirect to make all posts with that extension go to [url]http://johnsmith.com
[/url]
What you are saying is that I set up a new Redirect in Hostgator (does it have to be hostgator?) that makes evry post and every internal link from either of the above go to "http://www." Is that right? It won't mess up any links?

Also where do I find my hta access??

john
  • 0
http://johnreason.com/recommends.php?linkid=Affiloblueprint
Build a Successful Website in 12 Weeks.
 
esolutions
Posts: 475
Joined: 28 Apr 09
Trust:
Hi John,

I suggest that you do a little research on the .htaccess file before touching it if you're not sure what it is, otherwise you could mess stuff up if there is already existing configuration.

Once the redirect is setup correctly, what it is basically saying is that no matter how someone or some link points to your page:

"http://www.yoursite.com"
"http://www.yoursite.com/"
"yoursite.com/"
"yousite.com"

etc...

when visited, it will automatically be converted to the "standard" that you specify, so if you specify "http://www.yoursite.com" , yoursite.com will automatically become that. This is actually a good thing to cut down on duplicate content as well. Any existing links will not be broken.

Hope this all makes sense.
  • 0
Last edited by sydney on 15 Jun 10 2:58 am, edited 2 times in total.
Reason: unlinked URL as it is only used for illustration and not an actual link
 

List not growing fast enough?
Get More Opt Ins:
http://mattgreener.com/view/arfree
 
Site Admin
mikeantiga
Posts: 753
Joined: 28 Mar 10
Trust:
I've changed my blog URL several times and I can say that it was not that easy especially for those who have little knowledge with .htaccess. I've tried using these formats "http://blog.domain.com" , "http://domain.com/blog" and "http://www.domain.com" and all of them involved touching the .htaccess code and some changes in the domain mapping of my hosting control panel. If you want, you can send me a PM and I'll fix it for you. :)
  • 0
Last edited by sydney on 15 Jun 10 2:59 am, edited 1 time in total.
Reason: unlinked URL as it is only used for illustration and not an actual link
 

Want lessons on Affiliate Marketing, SEO and Content Creation? Get them here for FREE:
http://www.affilorama.com/lessons
 

This topic was started on Jun 06, 2010 and has been closed due to inactivity. If you want to discuss this topic further, please create a new forum topic.