Magento Multi-Store Setup / Store Codes Setting - html

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.

Related

New host - 404 Error

I am a newcomer at the web part of programming and I was given a host. I uploaded a simple index.html file with one header(It is correct). If I then try to connect with the nameserver/ip (gotten with PuTTy) , I get an 404 error. I have tried many different stuff about folders , but I could not fix anything
The nameserver IP address is almost certainly not your hosting IP address. The nameserver is the server (probably owned by your host - but possibly an outsourced service) that converts the human readable domain name (such as www.domain.com) to an IP address the computer can connect to (such as 198.252.206.16 - the IP 4 address I get for www.stackoverflow.com). It acts as a giant lookup list of domain names and IP addresses, much like a telephone book or Yellow Pages.
Moreover, as your host will almost certainly be hosting many domains (tens or possibly hundreds) per server, you will need to use a domain name when attempting to connect to your web page - this will be needed for Apache or IIS to know how to route the request/which content to return to the browser. It will do this using the request header sent by the browser when requesting the page. If you are testing locally then localhost/127.0.0.1 will be good enough if you have a single site registered/single set of content in a wwwroot directory (or equivalent). Similarly a virtual server or dedicated server may well respond to requests by IP address if it is the only site/application registered on the server.
To use another real-world analogy, it is a bit like addressing an item of post to a town or village - without including the recipient name, street or house number - and then expecting it to be received and to get a response.
Some hosts provide temporary domain names for you to use before you purchase your domain name or whilst the domain name details are propagated to DNS servers around the world. This usually looks something like-
http://your-user.your-host.com/ or http://server.your-host.com/your-username/
If your host offers such a service then this should normally be detailed in their self-help pages, or the admin area where you set up the site. Clearly such a domain is not intended for "production" use, and you should purchase a domain name before using the site for anything other than testing - if only to allow you the flexibility to move to a new host in the future.
This is not a question for StackOverflow users though, and I strongly suggest you consult your host's documentation or contact them for further assistance.

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.

creating a subdomain for every user

When a new user signs up, many sites create a new domain, something like newuser.example.com
Does this mean that they have separate directories for every user, and copy the code base into the newly created directories and create sub domains? What is the best way to do this?
Refer here:
When you auto-create subdomains on user signup does it create a new website or gives appearance of a website?
Surely a DNS rule of * -> IP address would take care of adding the subdomains quickly. Then its up to the web server to deal with the different host headers.
I would then create a new Apache directive for each different host header I needed (one for each subdomain) and have them be aliases for real website.
You can setup a wildcard domain *.yourdomain.com and handle the differences within your code if the application is pretty much the same between subdomains. Everyone comes to the same application and you just parse out the subdomain and store it in a variable which can be used to lookup different data in your database and / or render different templates / themes, etc.
I.e. subdomain_fu

How feasible/difficult is it to run an application that runs on a router?

In my example, I want to build an application that sends users who join a network some kind of interface and manage this at a central station (possibly the router, or a central server). The new user's input to this interface will be sent back to the central station and controlled.
How plausible is this? Is sending something to a newly discovered IP realistic?
As long as you control the DNS server, you can send them to any web server you like.
Completely plausible, but you'll need a router with open source firmware and you'll need to program in the language of that source code and have the toolchain to build the binary for the firmware.
The only thing I can think of is NoCatAuth and friends. The user has to use their web browser, but most are accustomed to that.
Are you trying to FORCE the users to use your application (e.g. by selling these routers via an ISP), or are you expecting users to co-operate (e.g. inside a organisation's WAN)?
If the latter, it may be sufficient to set the DHCP server inside the router to serve the address of an HTTP proxy. That will get picked up by most OS/browsers. The proxy can then be used to control web-traffic - which pages they can see, and which ones are redirected to your own web-app.
If the user is considered an adversary, it would be trivial for them to override the proxy settings. In a LAN/WAN situation, you need to make sure nothing is connecting them to the outside world, except through the proxy.