Tag Info

Hot answers tagged

10

You could make example.com/test.com resolve to the same webserver (IP) via dns (CNAME if you like) and that would work. If you are looking to do this on a per-path basis than no. DNS is ignorant of things like URL. DNS is simply translating the host part of the url (example.com) into IP address. The web server is in charge of figuring out what (or where) ...


10

It's not a DNS setting; you need to set up a redirect from mydomain.com to www.mydomain.com. Fortunately, Godaddy provides this service for free; follow the directions at http://community.godaddy.com/help/article/422


7

As has been noted, this can not be done entirely with DNS. However, if you have the DNS for example.com refer to the same server as test.com it is very simple to configure Apache to accomplish what you wish to do. Just add the following: <VirtualHost *:80> ServerName example.com Redirect permanent / http://test.com/ </VirtualHost> This ...


6

Masked forwarding uses frames to display the site being redirected to. For dropbox that does not appear to work. You may want to use use a regular redirect instead. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>dropbox.tombrito.com</title> </head> ...


3

Generally you should do HTTP-level redirects from the alternate host names to the canonical name of your choosing. This makes the entry in the browser location bar switch to the correct name and will act as a cue to search engines to phase out the alternates. The response code should be 301 "Permanent" in this case. Don't forget this is done on a host name ...


3

It would be much better to configure the webserver to handle this redirection. It is fairly trivial to configure Apache to do something along these lines. If you are using Apache, look up RewriteRule. Most other web servers have comparable features.


3

You can analyze the $_SERVER['HTTP_HOST'] variable in PHP: if( $_SERVER['HTTP_HOST'] !== 'abc.example.com' ){ header('Location: http://abc.example.com/', true, 301); exit; } If it's not abc.example.com it will redirect to it. I guess you can put it into your index.php at the very top.


2

This is a DNS record issue. Make sure that you have a DNS A record called domain.com, and that it's pointing at your server. A lot of the time, people only have the www.domain.com. A record believing you have to put www. before all domain names. However, people like myself never bother typing www., so we end up putting "domain.com".


2

Here is the exact .htaccess rule that I use to redirect all requests from www.mydomain.com to mydomain.com (since the shorter is my canonical URL): RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$ [NC] RewriteRule ^(.*)$ http://mydomain.com/$1 [R=301,L] That's easy enough to modify to redirect from foo.com to foobar.com, while preserving the request, the ...


2

You cannot do this via DNS alone. 301 redirects are not a DNS thing. They're a webserver thing. What you can do is point your example.com DNS entries to the same server as test.com, and set up example.com as an alias domain to test.com.


2

Personally I would have the content hosted on .co.uk and a redirect from .com to the content on .co.uk, that way any links will gain SEO momentum for the .co.uk domain.


2

If new-domain.com is literally a new domain you have just registered then no type of forwarding/redirection will provide any kind of SEO benefit for old-domain.com. However, if new-domain.com has been hosting an established website for a period of time and has itself been indexed for its own merits and acquired a number of backlinks, then setting up a 301 ...


2

If you are redirecting, or forwarding, then the chocolate-treat.com won't ever get into Google. You'll only see chocolate-dessert in there. So you can't really accomplish what you're trying to do. The better way is to create new websites on chocolate-treat.com and chocolate-snack.com and produce some great content on those domains. Great content always wins ...


2

This is just another case of two or more URLs pulling up the same content. You have two ways you can handle this: Do a 301 redirect from the URLs you do not want to show in the search results to the one that you do want to show. Use canonical URLs <link rel="canonical" href="http://www.12345.com/example.html" />


2

Do you actually have a * wildcard record in your DNS zone file? If yes then all you need to do is add an A record into the zone file and point it to the IP hosting your domain.ca now all connections to that specific sub domain will go to www.domain.com while the other wildcard subdomains will go some place else. Or in cPanel you would simply create your ...


2

In Chrome's Inspector you get this error Refused to display document because display forbidden by X-Frame-Options. Two ways that should fix it: IFRAMES - Custom Domain Dropbox Add some PHP - Overcoming “Display forbidden by X-Frame-Options” <?php header('X-Frame-Options: GOFORIT'); ?>


1

You could make an <iframe>, <style type=text/css> body{margin: 0;overflow:hidden;} </style> <iframe src="http://example.org/" style="border: 0; width: 100%; height: 100%" frameBorder="0"> Browser not compatible. </iframe> So you'd call this index.html and put it on the example.gr server.


1

Short answer: No, it's not possible to setup wildcard subdomains with .htaccess. To achieve what you want to do, you need to have a wildcard record in your DNS zone file, because your nameserver is where the subdomains are looked up. Also, many hosting companies will not allow you to add a wildcard record, so you'll have to check with them.


1

The issue with those types of forwards is they are often merely iframes, which are abysmal for SEO. What you should ensure is that it is a 301 Permanent Redirect. If not, use the following code in the .htaccess on the root of your site to accomplish the same effect. RewriteEngine on RewriteRule (.*) http://www.new-domain.com/$1 [R=301,L]


1

you might want to take a look at Apache mod_proxy ex. ProxyRequests Off <Proxy *>` Order deny,allow Allow from all </Proxy> #someone requests mydomain.com ProxyPass / http://myhost.com/wordpress ProxyPassReverse / http://myhost.com/wordpress this is if you can get a host just for .htaccess


1

If the content on both .com and .co.uk sites is the same, you really should redirect from one domain to another, or at very least using rel=canonical for each page pointing only at one TLD. Otherwise Google might see it as content duplication.


1

It sounds to me like your problem is user permissions. It doesn't matter if a user knows where a "file is kept" as long as they can't download it when they shouldn't. What you need to do is first store the files outside of the web root - for example if your site root is in /var/www/website, store the files in /var/websitefiles. Then on the site link to ...


1

This will redirect a subdomain to another domain or root domain RewriteEngine On RewriteCond %{HTTP_HOST} ^yoursubdomain\.yourdomain\.com$ [NC] RewriteRule ^(.*) http://www.newdomain.com/$1 [L,R] if you want to show www.mydomain.com/index.php website content to beta.mydomain.com sub domain or beta.mydomain.com website content to ...


1

I think you've asked a few questions about this both here and over at StackOverflow. The simple truth is that hosting on a sub-directory of a friend's site, and framed forwarding isn't helping your user experience, SEO, or your users share individual links to your site content. All up this is hurting your ability to promote the site and gain a following. ...


1

Downtime's are normal for major web hosts. It may be a scheduled maintenance on the server. But they can provide a rough time period. Any ways I suggest you to use a 3rd Party DNS server to bypass such issues, I personally use Cloudflare. And It's free too. When ever you met a situation like this, change the A Record off your root domain to new server, ...


1

A CNAME record does not "forward" anything, nor does it have anything to do with either HTTP or HTTPS protocols. A CNAME record basically tells your nameserver that the record is an alias for another (A) record and it should lookup the value for that. For example: example.com. IN CNAME example.net. Would make your nameserver query example.net A-record, ...


1

Yes it's possible to do the forward, but it won't work, you'd need a new certificate as @paulmorriss points out in the comments.


1

I think the best thing to do is add an A Record through the Go Daddy interface: http://help.godaddy.com/article/680#arecs Once you have the A record you can bind it in IIS (Right click the website, edit bindings) and then hopefully it should work!


1

Domain forwarding and the port you're trying to access have quite a little in common. While DNS servers are supposed to propagate you domain name, your DNS provider must point the requests to the IP address of the server your site is hosted at; IIS/Apache/other server should actually listen to a port supplied in request. Yes, you can forward subdomain to ...


1

Your friend in this kind of situation is cURL. A really really quick tutorial... Use curl's view headers only option (-I) to see what headers the server returns on your published domain: curl -I http://www.nulc2012.com/ I got this response, which says that a Permanent Redirect 301 is being sent to the browser, along with the target URL: HTTP/1.1 301 ...



Only top voted, non community-wiki answers of a minimum length are eligible