Showing posts with label GoDaddy. Show all posts
Showing posts with label GoDaddy. Show all posts

Friday, April 27, 2012

Shopify Custom Domain without the WWW on GoDaddy

I'm hosting my newest project on Shopify. I've a slight amount of experience with the platform from an aborted previous ecommerce effort, and I have to say it's pretty slick.

I don't remember if I ran into this the first time, but I have my own domain for the new project and I wanted to get it set up to work without the www prefix, i.e. I wanted it to be http://MyStore.com. Additionally, I wanted anyone who typed in http://www.MyStore.com/ to be automatically forwarded to the non-www version.

I'd registered my domain name with GoDaddy. Shopify's help system provides instructions for setting up your domain name on GoDaddy so your Shopify store will resolve to it. However, they provide instructions that make the www version the default and also use a domain forwarding method. Not what I wanted.

An hour or two of fruitless searching failed to resolve my problem, but I eventually figured it out. So.... if you have a Shopify store, registered your domain name through GoDaddy, and want your store URL to be the non-www version, here's how you do it.
  1. Log into your GoDaddy account
  2. Go to the Domain Manager
  3. Click on the domain name you want to use
  4. Find the DNS Manager section (under the Domain Enhancements section) and click on the Launch link
  5. Edit the A (Host) record, chaing the IP address to 204.93.213.45 (Shopify's IP addy for your store - see Shopify DNS help). It should look like:

  6. Make sure the CName for the WWW alias is set to @:

  7. Now go to your Shopify admin section, and go to Preferences-->DNS & Domains
  8. Click the Add a domain you already own link
  9. Enter you web site domain without the www
  10. Click the Add a domain you already own link
  11. Enter you web site domain with the www
  12. Make the one without the www you primary domain and check the box always redirect customers here?
It might takea few hours up to a day or two for all the changes to take, but when they do, you'll be abelt to get to your store with http://MyStore.com and when you enter http://www.MyStore.com it will automatically resolve to http://MyStore.com.

Yay!




Thursday, August 13, 2009

Send Email using ASP from a Web Form in GoDaddy

I'm not really fond of GoDaddy, just like I'm not fond of WalMart, but I still shop there. When it comes to cheap hosting, especially in a combined ASP/PHP/.Net environment, they're pretty much it. For less than $10 a month I can get 25 MySQL databases, 5 SOL databases, and unlimited top level domains. Can't be beat, or at least I couldn't find a place to beat it after wasting about hours of my life looking around before picking GoDaddy as my solution.

So I've been moving some of my sites over. Why pay $5 a month (which is still cheap) when I can get hosting for pennies? I mean, $5 isn't much, but when you're hosting 11 sites, it adds up.

Many of the sites I host use contact forms or confirmation forms, or some other form that needs to send out an email. Simple enough, but I spent a good three hours this morning figuring out how to do it on GoDaddy, and not for the reason you think.....

Before I get to that, here's the code:

sendUrl="http://schemas.microsoft.com/cdo/configuration/sendusing"
smtpUrl="http://schemas.microsoft.com/cdo/configuration/smtpserver"

' Set the mail server configuration
Set objConfig = CreateObject("CDO.Configuration")
objConfig.Fields.Item(sendUrl) = 2 ' cdoSendUsingPort
objConfig.Fields.Item(smtpUrl) = "relay-hosting.secureserver.net"
objConfig.Fields.Update

' Create and send the mail
Set objMail=CreateObject("CDO.Message")

' Use the config object created above
Set objMail.Configuration = objConfig
objMail.From = "sender@coolexample.com"
objMail.To = "recipient@coolexample.com"
objMail.Subject = "subject"
objMail.TextBody = "body"
objMail.Send

Set objSendMail = Nothing
Set objConfig = Nothing

Replace the hardcoded values for subject, from, to etc. with your own values. Bear in mind GoDaddy will only send 250 messages a day, so if you need to do more, you'll have to come up with some other solution.

Now here's the kicker. Two kickers, really:

The first is GoDaddy doesn't allow detailed error messages for classic ASP. All you get is a 500 Internal Server Error. I wasted a good bit of the three hours trying to figure out how to turn on errors but came up with nada. So good luck troubleshooting your ASP code....

And this is related to the above: I couldn't get the damn thing to work (and I couldn't see the error). So I ended up stepping through it line by line and guess what the problem was?

GoDaddy doesn't allow you to use a GMail address as a from address.

That's right my friends, Read it again.

So say you have a site with some sort of Send to a Friend thing where you ask for the sender's email, so the message says something like YourFriend@HisEmail.com has sent you a link and the from address is actually the person's email.

Well, if your address happens to be a GMail (and maybe other free mail apps, I didn't check) you get an error. An error that you can't troubleshoot.

Once I figured that out, the code worked fine, although I had to update some of my forms to change the sent from value so it didn't use the submittor's email address anymore.