surge.sh | Create subdomain of custom domain using surge.sh plus - subdomain

I'm a surge.sh plus customer, with a custom domain, let's say
http://bobswidgets.com
However, Bob has asked me to set up a subdomain for his new bespoke service. He wants custom.bobswidgets.com
But I can't figure out how to do this... and whether it's part of the surge plus package I have, or if I need to set this up separately.

I understand from the team at surge.sh that there are many ways to do this, but here's how I did it.
I'm assuming you already (as I did) have a site, with a custom domain, setup & running on surge.sh
First, you need to add a CNAME record to your DNS entry. In my case it's custom.bobswidgets.com and it should point to surge's domain na-west1.surge.sh
Now you can deploy the content for your subdomain directly with surge using surge /path/to/project -d http://custom.bobswidgets.com
Or you can include a CNAME file at the root of your content director, with the contents (It doesn't have an extension or anything)
custom.bobswidgets.com
Then use surge /path/to/project from your terminal
Essentially, it's exactly the same as the instructions for a normal custom domain - as https://surge.sh/help/adding-a-custom-domain - but using the details for your subdomain.

Related

Point a domain to my website

I have a domain name which i need to to point to a sub domain of my existing website. Both the domain name in question and website are held with the same host so i have CPanel for the website (which has its own domain name and is currently online. Note the host does not provide CPanel (or similar) for domain-names only (i.e. without hosting).
I have seen subdomains and addon domains but from the description in CPanel i cant figure which if either will do what i want ... or even Aliases.
How can i point the domain name to a sub-domain? if possible. I do not want the existing websites domain name to appear in the url when visiting the sub-domain pointed to by the new domain name.
Thanks.
Since you're using cPanel... https://documentation.cpanel.net/display/ALD/Setup+Edit+Domain+Forwarding
If you just deal with a registrar instead of a provider, typically you point '#.domain.com' to 'http://sub.domain.com' - where #.domain.com represents the direct name, domain.com.

Put Page Name before URL

I'm making a web application and i'm just wondering about the domain name. I want it like google does it where its like maps.google instead of google . com / maps
How do i do this when buying a domain?
These are called subdomains.
Any URL you buy can have any subdomain by adding a DNS record.
So if you buy example.com, you already have anything.example.com.
I suggest you read up on DNS a bit. This should get you started.
You can do it by creating subdomians via using your control panel
There are a few different levels of domain when it comes to DNS.
The first level is the top domain level. You cannot buy the top domain as they are the base of all domains and include the infamous .com or .org.
The second level is the one you can buy. You buy a domain related to a first level domain. So if you wanted akashkodesia.com you need to make sure it is available on the .com top domain and try to buy it.
Once you bought a domain, the subsequent levels are up to you. You can create whatever you want without asking anyone. Of course you have the restriction of the DNS protocol which is up to 255 characters total for your complete DNS name including dots.

Magento Multi-Store Setup / Store Codes Setting

I'm running Magento on a shared server with a single IP. I originally set it up as a single store with no plans to do multi-stores. Do I need to have store codes trailing each domain in magento to get this work correctly? They will all checkout at the main store URL. I have done this in the past and it has worked fine for me, but I was using store codes and with this instance I am not.
Will it completely jack up my SEO?
So I have store1.com (main store) and store2.com which needs to checkout at store1.com
Any help or link to a how to would be great. Have not been able to find a straight forward answer.
Your proposed setup of having store1.com and store2.com with a shared checkout URL of store1.com will work with a bit of work from yourself, but it's not clean or ideal in my opinion. Magento will append an SSID every time it switches domain to try and re-load the customers session data (They will have ?SSID=something). You would also need to change the checkout URL in your templates to only use the 1 domain which would require hard coding the full URL to the checkout and cart page in the store2.com templates.
Personally I would simply have separate checkouts for each domain which is supported straight out of the box in Magento without really doing anything. Why the need to have the checkout always under 1 domain? If it's because of SSL and 1 IP limitations then buy a UCC SSL certificate for multiple domains and have all the domains required to run on the server setup as SANS on the certificate. Cheap and simple. This way there is no need for store codes in URLs, SSIDs in domain switching, and the user will always stay on the same domain without any funny switching business or complications.
As a customer I would also be a little surprised to shop on one domain and then checkout on another these days, especially if one of the domains is international and this will ultimately effect your conversion rate.
You seem to be familiar with store views, so once you have setup your secondary store view, simply go into the admin and override the base URLs for the secondary domain. Point the store2.com domain to the same IP address you are using for store1.com. Setup a vhost on the server so store2.com effectively replicates the vhost for store1.com. You can use vhost directives so that magento initiates the correct store view for the relevant domain name in your new vhost.
SetEnv MAGE_RUN_CODE yourstorecode
SetEnv MAGE_RUN_TYPE store
You should now be able to have multiple sites/domains running on 1 magento instance each with an individual checkout URL. e.g. store1.com/checkout/onepage/ and store2.com/checkout/onepage/.
By using a UCC SSL certificate, the SSL will be valid for both domains and not cause you issues so no need for multiple IPs.

I want to point a sub-domain to a new domain address

I'm looking to point a new domain name to my website sub domain address.
So would all I do is buy the new domain name address and use httaccess to tell my site when the new domain name is entered to go to www.newdomain.mydomain.com. How might I go about doing that?
But I'm hoping to have the new domain name address still be shown when they are on my sub domain as this is for a festival I am helping with and they don't need to buy hosting for this short period.
Any help is appreciated.
One way to get the url to stay as the one a user typed in instead of showing up as your subdomain is to put the whole site in a frame that loads your subdomain inside of it. Some registrars will do this for you so you don't need to pay for extra hosting. If you go with this option, you don't really need a subdomain, though, as you could just put the new pages in a folder off of your main site since visitors won't see the address anyway.
A slightly more elegant solution would simply be to use virtual hosts, if your server has the capability. If you have your own server, they are not hard to set up. If you have a hosting package from a company like godaddy, the company website will often give instructions on how to do this. The idea is that the server will handle the responsibility of routing a query to a specific folder based on the url of the request. Then all you need to do is set up the folder. If you give more specifics about what your hosting setup is, it will be easier to give guidance in this respect.
To get your new domain name to point to your website you need to:
configure your domain name to point to your web site IP address
configure your web server to serve your website when it receives requests to that new domain name
The company from which you buy your new domain name will provide you with a web interface to configure your domain name and make it point to your IP address.
If you're managing your web server yourself, you will need to edit its configuration to add a new named virtualhost for your new domain name (virtualhost directives don't go into .htaccess files). If you're using a shared hosting company, they probably also provide a web interface to configure your web site, so that it accepts requests to your new domain name.

How do I get the text in the adress field in the browser to change when the user surfs on and outside of the page?

This is somewhat of a newbie question I'm sure and I hope the community will excuse me for not knowing this (or not knowing the appropriate search terms to resolve my question).
So, this is the deal: I'm running a small webpage with a small amount of visitors. I've written the whole page in HTML and CSS myself and I host it in my private DropBox (http://dl.dropbox.com/u/3394117/Hemsida/Psykofil/Index.html).
I've bought the domain name "www.psykofil.org" from Loopia (www.loopia.se) and I've directed this domain to the index.html file referenced to above.
Now, this is what I want to happen: I have three different places you can go to on the page (you choose where to ge through a menu on the left). When one of these links is clicked, it takes the user to another .html-file. What I would like to happen here is that this is seen in the adress field so when he or she clicks on "x", it should say www.psykofil.org/x on top. Also, when he or she navigates away from the webpage through a hyperlink I would like the adress field to update to show the new location. Right now, no matter what the user does, it always says www.psykofil.org in the adress field.
I probably should mention that my options (freely translated from swedish) when I go to the configuration of my domain name at Loopia is the following:
DNS
Parking
Forwarding (the one I'm currently using)
Send to an external URL
(Unavailable because I don't have a web hotel with Loopia) Point to another domain in the account.
(Unavailable because I don't have a web hotel with Loopia) Own homefolder for webpage.
That's because your page is inside a <frameset>, so the address bar will never update.
You say "I've directed this domain to the index.html file referenced to above." It sounds like you've set up 'domain forwarding.' Framesets are often the 'trick' hosts use to keep the same URL - embedding the pages you're 'forwarding' to in a frameset. It's called "domain masking." See http://www.hostingmultipledomainnames.com/domainforwarding.htm for a description of how it works.
If you upload your actual html files to your site root, that should do the trick. If you're not sure how to do that and you're a new webmaster, you may want to be in touch with your web host's support. Otherwise, if you want to have that domain, but keep your files in your dropbox account, your options I believe get complicated (things like reverse proxies).
UPDATED:
Typically, when people create a website, they do three thing: register a domain, buy a web hosting account, and then associate their domain with their hosting account. You've done the first part, and have found a clever way of managing the second part, but you haven't done the third part.
The process is like this:
You register your domain. I.e., you pay $10-30 a year for the exclusive right to a given domain name. Registering the domain means that when people type 'http://mysite.com' into their browser, your domain will come up. However, it's just a placeholder - there isn't any real content there. All your files and images need to be uploaded to a server in order for people to see them.
You purchase a web hosting account. Or in your case, you upload your files to a publicly-accessible server, which has the advantage of being free. You then upload all your content.
This is the part you're missing. You now need to associate your domain name with your hosting account. This typically happens without your intervention when you purchase both your domain name and your web hosting account through one company.
However, if you acquire them separately, you need to do two things:
a. Log in to your domain registrar and point the domain name to your server for your web hosting account. This is a signal to the Internet - hey, when you type in the domain name 'http://ssss.com', go to this server.
b. Log in to your web hosting account and "park" the domain at your account. This may be hard to understand at first, but basically, just telling the Internet to go to this or that server when typing in your domain name isn't very useful.
If that's all we needed to do, I could just register http://my-amazon.com and point my domain to Amazon.com. Then people could surf Amazon.com as http://myamazon.com and I could get rich from selling this now incredibly popular domain.
But that doesn't work. In order for me to actually browse the web hosting account through my domain name, I need to "add" the domain name to my hosting account. Dropbox doesn't let you do that. It's a file-sharing system, which you've cleverly used as a web host. However, you'll never be able to log into Dropbox and park your domain there, because that's not what they do.
Summary: You can think of this process like a pass in basketball. You can throw the ball by sending the user to a server, but the server has to catch it. In order to catch the ball, the server needs to know it's coming.
Your domain registrar is 'faking' this process by adding one page to its own server, which links to "http://dl.dropbox.com/yourpage/etc/etc/Index.html". This way, your domain registrar doesn't have to worry about hosting all your content and the headaches of technical support and server space.
The downside is, you don't have a webhost that allows you to park a domain at the moment. The upside is you're saving about $60-100 per year (it might be more or less in Sweden), which is what a basic "shared" hosting account would cost.
You can decide if having distinct webpages (http://psykofil.org/contact.html" etc), is worth it for you, or whether you're fine for now with the very low-cost solution that isn't perfect but at least allows people to access your site. What you've come up with is actually pretty cool, but it does have some limitations.
Finally: If you do want to go ahead an buy server space so you can host your site, it will be less of a headache to buy it through Loopla, if the price and service are good. Typically, you are given the option when making the purchase of linking your account to your already-registered domain name. Then all you need to do is use an FTP program like Filezilla to upload your content to your account, and you're done.
It seems your host is "masking" the URL, meaning actual index.html page located at "www.psykofil.org" is in fact, loading your index page located via dropbox into an "iframe" , hence your main URL does not change to reflect the changes.
Solution: Upload your file to your main host and change the default index file that has iframes with the dropbox index file.
I believe it's because you're using frames. Were you to simply link to the other html page(i.e About page) then the address bar would update.