Using GoDaddy Domain Hosting to link to Amazon S3 Website [closed] - amazon-s3

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
So I have some domains hosted at GoDaddy.com. I am trying to avoid to pay for a hosting service, except for using a static Amazon S3 page (as I don't expect much traffic at all for these sites). I have had some success, but not sure if this is a poor solution...
What I did for domain.com:
Set up permanent forwarding on GoDaddy to www.domain.com
Remove all DNS except for the A address to the GoDaddy IP, and a CNAME of www to the Amazon S3 site
It works as planned if someone types in www.domain.com. It seems to work alright for domain.com, too. However, it seems to do a 302 redirect instead of 301 even when I tell GoDaddy to have it be a permanent forward. I can ultimately goto Google Webmaster tools and say that I want it to use www.domain.com. However, that seems a little excessive.
Any suggestions on how to make this solution work better?
Possibly by changing some of the DNS settings or some other GoDaddy options that I don't know about?

You must name your S3 bucket the same as your domain, "www.example.com" Make sure you include the "www." subdomain prefix as part of the bucket name.
Set up your bucket as a web site per Amazon's instructions!. Make sure you have an "index.htm" file name entered and the correct bucket policy setup under Permissions.
Under Godaddy DNS settings make just one entry, set Host WWW CNAME, points to, "s3-website-us-east-1.amazonaws.com" or whatever s3 domain Amazon supplies for your bucket. You leave off the "http://www.example.com." heading in the url that Amazon supplies.
The last step under Forwarding/manage is to "forward only" your naked domain name "example.com" to "www.example.com"
If you did it right your browser will display your site as "www.example.com" whether you entered the www or not when you entered the url.
NOTE: You could just Forward to your bucket using the complete bucket url with "name masking", however most web crawlers will not see your complete site if you do it that way and web searches will fail.
Be sure to wait at least 30 minutes before testing your changes and by all means clear your cache in your browser or it will use the old address that it remembers from the past.

The DNS-apex-requires-an-A-record problem is definitely not well solved.
I can't personally vouch for them, but www.wwwizer.com hosts a free redirect service.

Related

Cloudflare - Redirect DomainA to DomainB SSL Issue [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
we have two domains, A and B, where I'm looking to get DomainA to redirect all requests to DomainB. There is no server behind DomainA. I've followed this tutorial exactly as presented on Cloudflare:
https://community.cloudflare.com/t/redirecting-one-domain-to-another/81960
And it works just fine for non-https traffic. Attempting to go to https://domaina.com gives me NET::ERR_CERT_COMMON_NAME_INVALID while http://domaina.com redirects to https://domainb.com just fine.
My page rules reflect the tutorial - that is *domaina.com/* 301 redirects to https://domainb.com/$2
My SSL options in Cloudflare is set to "Full". The orange clouds are on as well for both # and www on DomainA which currently are A records. I've tried CNAME as well. Has anyone else run into this before? What might I be doing wrong?
Try setting your SSL option to "Flexible" instead. Since your domain A doesn't have SSL setup, "Full" wouldn't work as it requires SSL on the origin server as well.
Free Clouflare plan will give you "Free certificate".
The Free Certificate's Common Name is always pointed to sni.cloudflaressl.com.
You can't change the common name unless you order Advanced Certificate Manager for $10/month.
You can see Advanced Certificate Manager in SSL > Edge Certificates > Order Advanced Certificate:
Sample "Free Certificate":
The certificate's common name is set to sni.cloudflaressl.com but it is valid to all major OS and browser because the Subject Alternative Name (SAN) in the certificate contains your domain.

CNAME Domain Mapping/forwarding in a Saas Application

I am trying to provide a feature for my users to map their custom domain [ which they will will purchase themselves ] and to their profile/page on my website say client.foo.com, using CNAME domain forwarding.
I have gone through various questions on StackOverflow regarding the same problem but all have focused on creating wildcard subdomains which I have already done and they function well.
Assumptions:
I am currently on a shared hosting, hence shared IP. [I can purchase a dedicated IP if that does the job efficiently.].
I am using apache server hence please suggest the solutions considering the same.
A better explanation of My issue - [Taken from other StackOverflow question, but solutions not as requested]:
I host at fooservice.com. For each user, they get their own subdomain bob.fooservice.com. I'm pretty sure I can get that part covered. Let's also assume that Bob wants the service to appear as a subdomain of his site awesomebob.com. He wants it to be foo.awesomebob.com. I know that what Bob has to do is add a CNAME record from foo.awesomebob.com -> bob.fooservice.com. My question is what do I have to do to make sure that valuable on my fooservice server.
Thank you for all your valuable suggestion well in advance.
Based on your explanation, you use wildcard subdomains, which all have the same IP I assume and you want to automate the process right?
So, as CNAME record is only pointing to the IP address, not redirecting, you need to create virtual host in the first order than other virtual host.
In this virtual host, create a script (index.php) to serve the correct subdomain's page from the requested custom domain.

Reduce server response time - apache2 on debian 7 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have pretty well-optimized website, PageSpeed Insights tool shows good results, but Google keeps saying reduce server response time which is 0.46 seconds. And it must not be greater than 200ms.
I have tried to delete all my htaccess content, then replace index.php with an empty index.html file, but server response remained the same. I am using a virtual private server with Debian 7and storing 2 websites with SSL on different IP addresses. The second site responds perfectly in 144 ms.
So, I can't find the reason why one site loads under 200ms and other in 460ms. I'm pretty sure that server has enough resources.
I would be grateful for the ideas.
You could try some tweaks on your apache server. Can't guarantee that you'll get the desired result but it's an easy job and I think you have nothing to lose if you try it! So edit your apache2.conf file and adjust your actual settings to match the ones bellow (these are good settings in terms of web server security as well).
TraceEnable Off
ServerSignature Off
ServerTokens Prod
FileETag None
HostnameLookups Off # this is important since your apache server won't try to translate your ip address into a dns name or host when you access your website
ExtendedStatus On # you can enable it afterwards, if you need it
Timeout 10
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
You could also disable apache modules (modules that you do not need or use). By default apache loads a big list of modules and I am pretty sure that you won't be needing them all. I can't provide you a list with what to keep enabled or what to disable but you can do a little Google research and based on your website you could decide what to disable and what to keep.
I am actually using all these settings on my CentOS 6.8 linux box and all the settings are in httpd.conf. On Debian you should edit /etc/apache2/apache2.conf and maybe some other files!

Server fault issue [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I am trying to link to a specific page within a PDF.
For desktop the URL works with:
https://www.examsolutions.net/papers/edexcel/gcse/nov17/paper2/paper2QUE.pdf#page=3
It takes you to page three, but does not work on mobile. However if I use jQuery
if ($(window).width() < 600) {
$("a").each(function(){
var newUrl = $(this).attr('href').replace('page=', 'page');
$(this).attr('href', newUrl);
});
}
The URL is changed to:
https://www.examsolutions.net/papers/edexcel/gcse/nov17/paper2/paper2QUE.pdf#page3
The removeal of the '=' works, but only on iOS. Is there a solution for Android or is it not possible due to Adobe PDF licenseing etc?
Option A is fine - do that.
It depends what the set up is on your new hosting...
If you have cPanel you can add the old domain as a parked domain - takes 30 seconds to set up - then just point your name servers/DNS the new hosting.
Alternatively you can set up the old site on your new hosting, then do a 301 redirect in the .htaccess file pointing it to your new domain.
http://css-tricks.com/snippets/htaccess/301-redirects/
Thanks for all the helpful guidance, I took it all on board and thought I would post back what I actuall did incase someone else needs a breakdown. To be clear, my hosting is a VPS on a LAMP stack running Ubuntu.
Repointed the a-record of the old site to the new one.
Created a config file in the sites-available folder of apache2
Pointed that config file to where I wanted the hosted folder to be,
in my case home/www/vhosts/
Created a folder in the above in the name of the old website
Added the .htaccess file in that folder with the 301 redirect in it.
Made the website active my using the a2ensite command
Restarted apache

Redirect subdomain with www. to without www [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I know there are a lot of such questions, but I could not find a suitable answer.
I am on a shared shell with web hosting.
I have a subdomain- "xyz.abc.com".
The problem is that when I type an extra "www." preceding it i.e. "www.xyz.abc.com", it redirects to the root website which hosts the shell i.e. "www.abc.com" instead of opening "xyz.abc.com".
I had contacted the admin. and he said that he cannot change the redirection settings as he will have to rewrite 2000 lines of APACHE server code.
I tried changing the .htaccess file in my public_html directory i.e "/home/usr/public_html/.htaccess" to include this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
This does not help.
I tried adding a .htaccess at "/home/usr/.htaccess". This too does not work.
I cannot add any files at "/home".
Is there any easy way for the admin. to change this redirection problem.
Most people tend to add a "www." before any web address.
The default virtual host (in this case, apparently abc.com's main site) will be the one that answers for domains the server gets requests for but doesn't know about. In your case, the server knows that xyz.abc.com goes to your site. However, it's never heard of www.xyz.abc.com. And since it hasn't, the request goes to the default site, which probably does its own 301 to bounce to the site it expects to be (which is apparently www.abc.com).
In order to fix this, assuming the host isn't willing to modify their own web site for you (and of course, assuming that the domain name www.xyz.abc.com points to the same server as xyz.abc.com), someone needs to add www.xyz.abc.com or *.xyz.abc.com to the list of domain aliases for your site. If the server was set up decently for hosting, that's one line (ServerAlias *.xyz.abc.com) in the configuration for that site. 2000 lines amounts to an Apache config for an entire small-to-medium-capacity web server, including a dozen or so individual name-based virtual hosts. If the admin was not exaggerating, then they're basically telling you that that server is not set up for real, business-grade web hosting -- they're probably doing a cheesy mass-vhost thing that can't be tailored for individual users.
If you can't get the admin to fix up the server aliases for you, one alternative would be to acquire yourself a domain from a registrar that offers "URL forwarding". When set up properly, that'd point your domain at a site that simply redirects to xyz.abc.com. That's kinda ugly, but it works as long as all the links within your site go to xyz.abc.com (some URL forwarders might not pay attention to the resource part of the URL, and might redirect everything to /). And it doesn't require the admin to do anything.