0

I tried redirecting in the "head" section, but what I got was a flickering screen. I wish to have the www.redirect to the "clean" URL. How do I do so without the flickering (which I take is redirecting run amok.)

2
  • 2
    How does your question title relate to your question? Because I don’t see it.
    – Daniel B
    Commented Dec 27, 2015 at 18:03
  • According to the domain names you gave in comments earlier, they are both configured to point to the same IP Address via an A record. Which suggests that this is a server misconfiguration. You need to edit your question to explain what you are serving the pages with and how it is configured.
    – Michael B
    Commented Dec 29, 2015 at 10:06

3 Answers 3

0

The difference is because www. is not part of the main domain. www. is called a subdomain.

This means that on your website, you'll have to make sure the subdomain www. points to the same folder as your main domain does. With this, you won't need any redirection, and both will be the exact same.

7
  • The www is not a subdomain; it is the hostname. See this answer on Server Fault: serverfault.com/a/269840/324849
    – Ron Maupin
    Commented Dec 27, 2015 at 17:46
  • @RonMaupin Of course www. is a subdomain. Just because most server configurations allow www. to work as well as without doesn't mean it suddenly is not a subdomain. A FQDN consists of protocol://subdomain.domain.extension
    – LPChip
    Commented Dec 27, 2015 at 18:27
  • 1
    The www is the hostname, example.com is the domain name, and www.example.com is the FQDN. I have no idea where you get that www is a subdomain. If you have anything to back up your position, please edit your question to include it and add a link to it.
    – Ron Maupin
    Commented Dec 27, 2015 at 18:27
  • I don't care how many angels can dance on the head of a domain! :-) Just how to get them pointing to same index.asp as uploaded by DreamWeaver.
    – greenber
    Commented Dec 27, 2015 at 18:54
  • 1
    @RonMaupin : This backs up LPChip's position: Wikipedia's page for "Domain name" says "www is a label to create www.example.com, a subdomain of example.com."... "A hostname is a domain name that has at least one associated IP address. For example, the domain names www.example.com and example.com are also hostnames, whereas the com domain is not." If you're taking the position that "www.example.com" is a subdomain but "www." is not, then you're squabbling over the technical interpretation of a recognized abbreviation.
    – TOOGAM
    Commented Dec 30, 2015 at 16:07
0

How are you redirecting in the "head" section of your HTML code? Are you using "refresh", e.g., something like <META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://example.com/index.html"> (having a value greater than 0 indicates you wish to have a delay of x seconds before the browser refreshes the page) or are you using a 301 redirect as noted at Will putting the HTML from a 301 redirect page into a document perform the same function as a real 301 redirect? or something else? If you are using an Apache web server and can edit httpd.conf you can make www.example.com an alias for example.com. E.g., by putting the following in a VirtualHost section for the domain name and then restarting the Apache web server software with apachectl restart:

ServerName example.com
ServerAlias www.example.com

It won't change the URL, but they will both point to the same document root. If you want to rewrite the URL, another option, if you are using Apache for the web server, is to see the explanation offered for the question Changing www to point to non-www, instead of the opposite, using .htaccess at another Stack Exchange site, webmasters.stackexchange.com.

0

Well, it appears this is a local problem,and only with Chrome: two tabs one with www. and without in IE doesn't show the prob but does in Chrome but only on this machine -- maybe a caching prob? Oh well this is quite literally my problem to solve. Thank you everyone!!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .