login community faq

Hi there,

i hope this is the right place to ask this.....

I have a website with a .co.uk domain name. I'm redesigning the site and wonder about swapping to a .com domain.

The current site is no.1 in google rankings for relevant searches and I don't want to lose that really.

So can i somehow redirect the .co.uk to the .com? I keep reading about 301 redirects and .htaccess but it seems a bit confusing. I'm not an IT wizard, and the site has been designed using Dreamweaver.

Any help would be much appreciated. Is there a guide or tutorial aimed at intermediate level?

Thanks

Dave

asked Jul 27 '12 at 05:40

scubadoo's gravatar image

scubadoo
11


Hi,

Using 301 redirects is the way to go. You can either set those up via .htaccess, in the web server config (if you're using a custom web server), or programatically in your web scripts.

If you have trouble doing this, or if you aren't sure what you've done is correct, you can open a ticket so our support staff can take a look.

answered Jul 27 '12 at 10:43

todork's gravatar image

todork
10964

First create a new application for your .com domain. Make sure it works as intended. Then create a .htaccess (that's the full name) file with the following content:

Redirect 301 / http://www.your-new-domain.com

If you make it with Notepad, make sure that you set the file type to "All files" when saving, or it will be called .htaccess.txt (and that won't work).

Make sure your .co.uk site is set up as "Static/CGI/PHP". Put the .htaccess file in the root of your .co.uk site and delete everything else.

There's a more complex method here: Redirect a Domain with a Static/CGI/PHP App, but I doubt you'll need that.

answered Jul 31 '12 at 09:42

Donatzsky's gravatar image

Donatzsky
12

Thanks for the replies.

I'm confused by the following bits, like i said i'm a basic designer using dreamweaver and as far as I know the site is just hosted by Webfaction'd default method. Has anyone seen a guide that would talk me through it?

Cheers

Dave

"in the web server config (if you're using a custom web server), or programatically in your web scripts.

Put the .htaccess file in the root of your .co.uk site and delete everything else."

(Aug 08 '12 at 02:18) scubadoo scubadoo's gravatar image

Will i already have an .htaccess file, and if so where?

what type of server will Webfaction assign to me by default?

(Aug 08 '12 at 04:01) scubadoo scubadoo's gravatar image

You may or may not, depending on whether or not your framework uses one by default. If you do, then you can add the redirection code to the top of the file. If you do not, then you just create a new file with the same redirection code.

As for "what type of server will Webfaction assign to me by default?", I am not sure what you mean. If you are asking what type of server software serves a default Static/CGI/PHP application, it would be Apache - and Apache uses .htaccess files.

(Aug 08 '12 at 04:06) ryans ♦♦ ryans's gravatar image

As you're using Dreamweaver your site is most likely set up as "Static/CGI/PHP", and I believe that's also what the default site uses when you first sign up. If, on the other hand, you use something like Wordpress it may well be something else entirely.

To see what it is, log in to the WF control panel, click "Domains/Websites" > "Applications" and find it in the list. The middle column is the type.

"in the web server config (if you're using a custom web server), or programatically in your web scripts."

Most likely this does not apply to you, since you're probably using the default server software.

"Put the .htaccess file in the root of your .co.uk site and delete everything else."

Means that the address should be www.your-old-domain.co.uk/.htaccess

The reason for deleting everything else, is so there's no chance of the server getting confused as to what to do.

Now, before you do any of this, make sure the .com is working so you don't risk any down-time.

(Aug 08 '12 at 05:26) Donatzsky Donatzsky's gravatar image

Thanks,

I've checked and it's 'Static/CGI/PHP'.

So i set up a new application for the .com site, upload all my html pages to my ftp and publish the site and check it's working.

Still a bit confused about creating the .htaccess file and where to put it but I'll do some research.

If i don't have an htaccess file can i create one as an html page in Dreamweaver by typing the redirect stuff in the code page of DW?

And then save it to my ftp in the same folder that has my index.html file?

And what do i with all the old html pages? DO i delete all content and type in the redirect on those as well.

sorry to be such a noob! It's just not my discipline really.

(Aug 08 '12 at 06:00) scubadoo scubadoo's gravatar image

Hi,

The .htaccess file needs to be in the /home/username/webapps/appname directory (where 'username' stands for your account username, and 'appname' stands for the name of your application). Indeed, that is the same folder that contains your index.html.

Don't create the .htaccess file as an HTML page, as some HTML tags may get added to it and break the code. Instead, use a standard text editor.

You don't have to do anything to any of your old HTML pages. You can delete them or leave them as it is.

If you have any further questions, please let us know.

(Aug 08 '12 at 09:40) todork todork's gravatar image
showing 5 of 6 show all
Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×47

Asked: Jul 27 '12 at 05:40

Seen: 769 times

Last updated: Aug 08 '12 at 09:40

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited