Tag Info

Hot answers tagged

9

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) ...


7

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


6

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 ...


5

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

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

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 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

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

Domain forwarding is accomplished by pointing the hostname you want to forward to a server, then configuring the server to accept HTTP requests and forward any request to another URI. This means that, in order for it to work, the DNS record for the hostname must actually point to an IP address, the address of the server that is handling the forwarding. In ...


1

It sounds like what you want to do is domain mirroring, or do you just want to forward from one URL to another? If you're looking to forward domains, you would want to look at the DNS settings where you registered your domain, or look to see if you have a control panel where you can manage domains and redirections. If you just want to forward to an ...


1

It's not difficult really. When they hit your domain do whatever tracking you want (i.e. logging to a database) then forward them with a 303 redirect to the landing page. Another option (don't know if this is actually possible), forward the domain to a URL shortener which offers tracking.


1

It depends if Bluehost allows port redirection using an .htaccess file, try this: RewriteEngine On RewriteCond %{HTTP_HOST} ^subdomain.old-domain.com$ [NC] RewriteCond %{SERVER_PORT} ^8014$ RewriteRule ^(.*)$ http://subdomain.new-domain.com:8000/subdirectory/$1 [R=301,L]


1

Consider... bar.example.com. CNAME foo.example.com. foo.example.com. A 192.0.2.23 Here, when a DNS resolver encounters a CNAME record while looking for a regular resource record, it will restart the query using the canonical name instead of the original name. That is when an A record lookup for bar.example.com is done, the resolver ...


1

I wouldn't class a iframe solution the best solution, while this doesn't answer your question directly it does give you an additional and more robust never-mind a more browser friendly site. The method that I believe is best suited for you is to use rel="canonical" on the .gr domain referring to .org as the master (no redirects). If they visit .gr they ...


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

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

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 ...



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