How can I redirect www to non www site?

Proper Redirect in HTML

  • We have a business that has been selling wholessale watches since 1952 and we also have a website (www.abouttime.com). We have a individual page for each brand of watch we sell. I have created new watch brand pages with new URL's to replace my old watch brand pages. For example using one watch brand and the old page (old url) and the new page (new URL) would be like this; http://www.abouttime.com/elini.html this is the one of the old Elini watch brand pages http://www.abouttime.com/elini-watches.html this is one of the new Elini watch brand pages From this brand I have removed all associated links within my website to the old brand page (http://www.abouttime.com/elini.html) and now have all links pointing to the new brand page (http://www.abouttime.com/elini-watches.html). It has been like this for months and usually google captures my changes within a week. The isssue is that I cannot get google to replace my listings within the search engine with my new page (new url). I have read that I need to create a 301 redirect on the old page to the new page. So this is what I am asking; What should I exactly do to fix this issue? I would prefer to use HTML code that I can cut from the answer of this question and paste into my site. Is it a 301 redirect that I need and what exactly should the code me that I can paste into my site code to have this redirect work? If it is not a 301 redirect what exactly should I do? Thank you

  • Answer:

    Hello Abouttime The easiest way to solve this issue is to add a <meta> tag to the top of your http://www.abouttime.com/elini.html page. This can be done by adding this following line in the <head> section of your elini.html page: <meta http-equiv="refresh" content="0;url=http://www.abouttime.com/elini-watches.html" /> The "0" in the above line means the user is immediately redirected to the elini-watches.html page. This means that anyone who visits the old page will now automatically be redirected to the new one. An alternative method is available if your website is running on the Apache webserver. First you need to check with your webhost that you have the mod_alias module installed (most set-ups do have this installed) and that you have access to the .htaccess file. If the mod_alias module is not available, the mod_rewrite module would also work (this is more powerful). You then need to add this line to your .htaccess file: Redirect permanent elini.html http://www.abouttime.com/elini-watches.html This will permanently redirect anyone who enters elini.html in their URL to elini-watches.html with a 301 redirect. Like robertskelton-ga said this is not done at the HTML level but at a server level. In my opinion this is a better way of achieving what you want to do than by using the <meta> tag above. Further advice on using mod_alias can be found here: http://httpd.apache.org/docs/mod/mod_alias.html http://httpd.apache.org/docs/mod/mod_rewrite.html If you have any questions regarding this subject please ask for clarification and I will do my best to help.

abouttime-ga at Google Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.